Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1446)

Unified Diff: content/shell/browser/layout_test/layout_test_content_browser_client.h

Issue 639293005: Content Shell: Introduce LayoutTestContentBrowserClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/shell/browser/layout_test/layout_test_content_browser_client.h
diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.h b/content/shell/browser/layout_test/layout_test_content_browser_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..7069734d57afc3022479479495c8ed4c9a7efbbf
--- /dev/null
+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.h
@@ -0,0 +1,42 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_CONTENT_BROWSER_CLIENT_H_
+#define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_CONTENT_BROWSER_CLIENT_H_
+
+#include "content/shell/browser/shell_content_browser_client.h"
+
+namespace content {
+
+class LayoutTestNotificationManager;
+
+class LayoutTestContentBrowserClient : public ShellContentBrowserClient {
+ public:
+ // Gets the current instance.
+ static LayoutTestContentBrowserClient* Get();
+
+ LayoutTestContentBrowserClient();
+ virtual ~LayoutTestContentBrowserClient();
+
+ // Will be lazily created when running layout tests.
+ LayoutTestNotificationManager* GetLayoutTestNotificationManager();
+
+ // ContentBrowserClient overrides.
+ virtual void RequestDesktopNotificationPermission(
+ const GURL& source_origin,
+ RenderFrameHost* render_frame_host,
+ const base::Callback<void(blink::WebNotificationPermission)>& callback)
+ override;
+ virtual blink::WebNotificationPermission
+ CheckDesktopNotificationPermission(
+ const GURL& source_url,
+ ResourceContext* context,
+ int render_process_id) override;
+ private:
+ scoped_ptr<LayoutTestNotificationManager> layout_test_notification_manager_;
+};
+
+} // content
+
+#endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_CONTENT_BROWSER_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698