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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_view.h

Issue 8520036: Revert 110262 - Have ExtensionHost use TabContents instead of RenderViewHost. Try #2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:mergeinfo
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 10 matching lines...) Expand all
21 class ExtensionView : public views::NativeViewHost { 21 class ExtensionView : public views::NativeViewHost {
22 public: 22 public:
23 ExtensionView(ExtensionHost* host, Browser* browser); 23 ExtensionView(ExtensionHost* host, Browser* browser);
24 virtual ~ExtensionView(); 24 virtual ~ExtensionView();
25 25
26 // A class that represents the container that this view is in. 26 // A class that represents the container that this view is in.
27 // (bottom shelf, side bar, etc.) 27 // (bottom shelf, side bar, etc.)
28 class Container { 28 class Container {
29 public: 29 public:
30 virtual ~Container() {} 30 virtual ~Container() {}
31 // Mouse event notifications from the view. (useful for hover UI).
32 virtual void OnExtensionMouseMove(ExtensionView* view) = 0;
33 virtual void OnExtensionMouseLeave(ExtensionView* view) = 0;
31 virtual void OnExtensionPreferredSizeChanged(ExtensionView* view) {} 34 virtual void OnExtensionPreferredSizeChanged(ExtensionView* view) {}
32 }; 35 };
33 36
34 ExtensionHost* host() const { return host_; } 37 ExtensionHost* host() const { return host_; }
35 Browser* browser() const { return browser_; } 38 Browser* browser() const { return browser_; }
36 const Extension* extension() const; 39 const Extension* extension() const;
37 RenderViewHost* render_view_host() const; 40 RenderViewHost* render_view_host() const;
38 void DidStopLoading(); 41 void DidStopLoading();
39 void SetIsClipped(bool is_clipped); 42 void SetIsClipped(bool is_clipped);
40 43
41 // Notification from ExtensionHost. 44 // Notification from ExtensionHost.
42 void UpdatePreferredSize(const gfx::Size& new_size); 45 void UpdatePreferredSize(const gfx::Size& new_size);
46 void HandleMouseMove();
47 void HandleMouseLeave();
43 48
44 // Method for the ExtensionHost to notify us when the RenderViewHost has a 49 // Method for the ExtensionHost to notify us when the RenderViewHost has a
45 // connection. 50 // connection.
46 void RenderViewCreated(); 51 void RenderViewCreated();
47 52
48 // Set a custom background for the view. The background will be tiled. 53 // Set a custom background for the view. The background will be tiled.
49 void SetBackground(const SkBitmap& background); 54 void SetBackground(const SkBitmap& background);
50 55
51 // Sets the container for this view. 56 // Sets the container for this view.
52 void SetContainer(Container* container) { container_ = container; } 57 void SetContainer(Container* container) { container_ = container; }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // Note: the view does not own its container. 103 // Note: the view does not own its container.
99 Container* container_; 104 Container* container_;
100 105
101 // Whether this extension view is clipped. 106 // Whether this extension view is clipped.
102 bool is_clipped_; 107 bool is_clipped_;
103 108
104 DISALLOW_COPY_AND_ASSIGN(ExtensionView); 109 DISALLOW_COPY_AND_ASSIGN(ExtensionView);
105 }; 110 };
106 111
107 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_ 112 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_popup.cc ('k') | chrome/browser/ui/views/extensions/extension_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698