]> git.sesse.net Git - casparcg/blobdiff - dependencies64/cef/linux/tests/cefclient/browser/client_browser.cc
Upgrade CEF to 3.3029.1611.g44e39a8 / Chromium 58.0.3029.81.
[casparcg] / dependencies64 / cef / linux / tests / cefclient / browser / client_browser.cc
diff --git a/dependencies64/cef/linux/tests/cefclient/browser/client_browser.cc b/dependencies64/cef/linux/tests/cefclient/browser/client_browser.cc
new file mode 100644 (file)
index 0000000..f446dc8
--- /dev/null
@@ -0,0 +1,40 @@
+// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
+// reserved. Use of this source code is governed by a BSD-style license that
+// can be found in the LICENSE file.
+
+#include "tests/cefclient/browser/client_browser.h"
+
+#include "include/cef_crash_util.h"
+
+namespace client {
+namespace browser {
+
+namespace {
+
+class ClientBrowserDelegate : public ClientAppBrowser::Delegate {
+ public:
+  ClientBrowserDelegate() {}
+
+  void OnContextInitialized(CefRefPtr<ClientAppBrowser> app) OVERRIDE {
+    if (CefCrashReportingEnabled()) {
+      // Set some crash keys for testing purposes. Keys must be defined in the
+      // "crash_reporter.cfg" file. See cef_crash_util.h for details.
+      CefSetCrashKeyValue("testkey1", "value1_browser");
+      CefSetCrashKeyValue("testkey2", "value2_browser");
+      CefSetCrashKeyValue("testkey3", "value3_browser");
+    }
+  }
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(ClientBrowserDelegate);
+  IMPLEMENT_REFCOUNTING(ClientBrowserDelegate);
+};
+
+}  // namespace
+
+void CreateDelegates(ClientAppBrowser::DelegateSet& delegates) {
+  delegates.insert(new ClientBrowserDelegate);
+}
+
+}  // namespace browser
+}  // namespace client