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

Unified Diff: chrome/browser/extensions/extension_view.h

Issue 363233002: Abstract base 'ExtensionView' to Fix DEPS violation in extension_view_host.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase for r281699 (unused hwnd_util.h) Created 6 years, 5 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
« no previous file with comments | « chrome/browser/extensions/DEPS ('k') | chrome/browser/extensions/extension_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_view.h
diff --git a/chrome/browser/extensions/extension_view.h b/chrome/browser/extensions/extension_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..e974d0973b5a875b7dca12bc6be2e78a238c1fbc
--- /dev/null
+++ b/chrome/browser/extensions/extension_view.h
@@ -0,0 +1,56 @@
+// 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_H_
+#define CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_H_
+
+#include "ui/gfx/native_widget_types.h"
+
+class Browser;
+
+namespace content {
+struct NativeWebKeyboardEvent;
+class WebContents;
+}
+
+namespace gfx {
+class Size;
+}
+
+namespace extensions {
+
+// Base class for platform-specific views used by extensions in the Chrome UI.
+class ExtensionView {
+ public:
+ virtual ~ExtensionView() {}
+
+ // Initialize the view, once a newly created view has been set in the host.
+ virtual void Init() = 0;
+
+ // If attached to a Browser (e.g. popups), the Browser it is attached to.
+ virtual Browser* GetBrowser() = 0;
+
+ // Returns the extension's native view.
+ virtual gfx::NativeView GetNativeView() = 0;
+
+ // Method for the ExtensionHost to notify us about the correct size for
+ // extension contents.
+ virtual void ResizeDueToAutoResize(const gfx::Size& new_size) = 0;
+
+ // Method for the ExtensionHost to notify us when the RenderViewHost has a
+ // connection.
+ virtual void RenderViewCreated() = 0;
+
+ // Handles unhandled keyboard messages coming back from the renderer process.
+ virtual void HandleKeyboardEvent(
+ content::WebContents* source,
+ const content::NativeWebKeyboardEvent& event) = 0;
+
+ // Method for the ExtensionHost to notify that the extension page has loaded.
+ virtual void DidStopLoading() = 0;
+};
+
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_H_
« no previous file with comments | « chrome/browser/extensions/DEPS ('k') | chrome/browser/extensions/extension_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698