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

Unified Diff: chrome/browser/ui/views/extensions/extension_view_views.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: respond to comments Created 6 years, 6 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: chrome/browser/ui/views/extensions/extension_view_views.h
diff --git a/chrome/browser/ui/views/extensions/extension_view_views.h b/chrome/browser/ui/views/extensions/extension_view_views.h
index 5d8581577abf0e2e44bcdb645a3a6733e6167bb0..52ef54384a570a20ccf4bc42c2d764b156733b6b 100644
--- a/chrome/browser/ui/views/extensions/extension_view_views.h
+++ b/chrome/browser/ui/views/extensions/extension_view_views.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "chrome/browser/extensions/extension_view.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "extensions/browser/extension_host.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -20,7 +21,8 @@ class RenderViewHost;
}
// This handles the display portion of an ExtensionHost.
-class ExtensionViewViews : public views::NativeViewHost {
+class ExtensionViewViews : public views::NativeViewHost,
+ public extensions::ExtensionView {
public:
// A class that represents the container that this view is in.
// (bottom shelf, side bar, etc.)
@@ -46,24 +48,23 @@ class ExtensionViewViews : public views::NativeViewHost {
content::RenderViewHost* render_view_host() const {
return host_->render_view_host();
}
- Browser* browser() const { return browser_; }
void set_minimum_size(const gfx::Size& minimum_size) {
minimum_size_ = minimum_size;
}
void set_container(Container* container) { container_ = container; }
- void DidStopLoading();
void SetIsClipped(bool is_clipped);
- // Notification from ExtensionHost.
- void ResizeDueToAutoResize(const gfx::Size& new_size);
-
- // Method for the ExtensionHost to notify us when the RenderViewHost has a
- // connection.
- void RenderViewCreated();
-
- // Handles unhandled keyboard messages coming back from the renderer process.
- void HandleKeyboardEvent(const content::NativeWebKeyboardEvent& event);
+ // extensions::ExtensionView:
+ virtual void Init() OVERRIDE;
+ virtual Browser* GetBrowser() OVERRIDE;
+ virtual gfx::NativeView GetNativeView() OVERRIDE;
+ virtual void ResizeDueToAutoResize(const gfx::Size& new_size) OVERRIDE;
+ virtual void RenderViewCreated() OVERRIDE;
+ virtual void HandleKeyboardEvent(
+ content::WebContents* source,
+ const content::NativeWebKeyboardEvent& event) OVERRIDE;
+ virtual void DidStopLoading() OVERRIDE;
private:
friend class extensions::ExtensionHost;

Powered by Google App Engine
This is Rietveld 408576698