| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| 11 #include "googleurl/src/gurl.h" | |
| 12 #include "third_party/skia/include/core/SkBitmap.h" | 11 #include "third_party/skia/include/core/SkBitmap.h" |
| 13 #include "views/controls/native/native_view_host.h" | 12 #include "views/controls/native/native_view_host.h" |
| 14 | 13 |
| 15 class Browser; | 14 class Browser; |
| 16 class Extension; | 15 class Extension; |
| 17 class ExtensionHost; | 16 class ExtensionHost; |
| 18 class ExtensionView; | 17 class ExtensionView; |
| 19 class RenderViewHost; | 18 class RenderViewHost; |
| 20 | 19 |
| 21 // A class that represents the container that this view is in. | 20 // A class that represents the container that this view is in. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 32 public: | 31 public: |
| 33 ExtensionView(ExtensionHost* host, Browser* browser); | 32 ExtensionView(ExtensionHost* host, Browser* browser); |
| 34 ~ExtensionView(); | 33 ~ExtensionView(); |
| 35 | 34 |
| 36 ExtensionHost* host() const { return host_; } | 35 ExtensionHost* host() const { return host_; } |
| 37 Browser* browser() const { return browser_; } | 36 Browser* browser() const { return browser_; } |
| 38 Extension* extension() const; | 37 Extension* extension() const; |
| 39 RenderViewHost* render_view_host() const; | 38 RenderViewHost* render_view_host() const; |
| 40 void SetDidInsertCSS(bool did_insert); | 39 void SetDidInsertCSS(bool did_insert); |
| 41 void set_is_clipped(bool is_clipped) { is_clipped_ = is_clipped; } | 40 void set_is_clipped(bool is_clipped) { is_clipped_ = is_clipped; } |
| 41 bool is_toolstrip() const { return is_toolstrip_; } |
| 42 void set_is_toolstrip(bool is) { is_toolstrip_ = is; } |
| 42 | 43 |
| 43 // Notification from ExtensionHost. | 44 // Notification from ExtensionHost. |
| 44 void DidContentsPreferredWidthChange(const int pref_width); | 45 void DidContentsPreferredWidthChange(const int pref_width); |
| 45 void HandleMouseEvent(); | 46 void HandleMouseEvent(); |
| 46 void HandleMouseLeave(); | 47 void HandleMouseLeave(); |
| 47 | 48 |
| 48 // Set a custom background for the view. The background will be tiled. | 49 // Set a custom background for the view. The background will be tiled. |
| 49 void SetBackground(const SkBitmap& background); | 50 void SetBackground(const SkBitmap& background); |
| 50 | 51 |
| 51 // Sets the container for this view. | 52 // Sets the container for this view. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // The container this view is in (not necessarily its direct superview). | 97 // The container this view is in (not necessarily its direct superview). |
| 97 // Note: the view does not own its container. | 98 // Note: the view does not own its container. |
| 98 ExtensionContainer* container_; | 99 ExtensionContainer* container_; |
| 99 | 100 |
| 100 // Whether the RenderView has inserted extension css into toolstrip page. | 101 // Whether the RenderView has inserted extension css into toolstrip page. |
| 101 bool did_insert_css_; | 102 bool did_insert_css_; |
| 102 | 103 |
| 103 // Whether this extension view is clipped. | 104 // Whether this extension view is clipped. |
| 104 bool is_clipped_; | 105 bool is_clipped_; |
| 105 | 106 |
| 107 // Whether this view is currently displaying in toolstrip mode. |
| 108 bool is_toolstrip_; |
| 109 |
| 106 DISALLOW_COPY_AND_ASSIGN(ExtensionView); | 110 DISALLOW_COPY_AND_ASSIGN(ExtensionView); |
| 107 }; | 111 }; |
| 108 | 112 |
| 109 #endif // CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_ | 113 #endif // CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_ |
| OLD | NEW |