| 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" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // This handles the display portion of an ExtensionHost. | 29 // This handles the display portion of an ExtensionHost. |
| 30 class ExtensionView : public views::NativeViewHost { | 30 class ExtensionView : public views::NativeViewHost { |
| 31 public: | 31 public: |
| 32 ExtensionView(ExtensionHost* host, Browser* browser); | 32 ExtensionView(ExtensionHost* host, Browser* browser); |
| 33 ~ExtensionView(); | 33 ~ExtensionView(); |
| 34 | 34 |
| 35 ExtensionHost* host() const { return host_; } | 35 ExtensionHost* host() const { return host_; } |
| 36 Browser* browser() const { return browser_; } | 36 Browser* browser() const { return browser_; } |
| 37 Extension* extension() const; | 37 Extension* extension() const; |
| 38 RenderViewHost* render_view_host() const; | 38 RenderViewHost* render_view_host() const; |
| 39 void SetDidInsertCSS(bool did_insert); | 39 void DidStopLoading(); |
| 40 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_; } | 41 bool is_toolstrip() const { return is_toolstrip_; } |
| 42 void set_is_toolstrip(bool is) { is_toolstrip_ = is; } | 42 void set_is_toolstrip(bool is) { is_toolstrip_ = is; } |
| 43 | 43 |
| 44 // Notification from ExtensionHost. | 44 // Notification from ExtensionHost. |
| 45 void UpdatePreferredWidth(int pref_width); | 45 void UpdatePreferredWidth(int pref_width); |
| 46 void HandleMouseEvent(); | 46 void HandleMouseEvent(); |
| 47 void HandleMouseLeave(); | 47 void HandleMouseLeave(); |
| 48 | 48 |
| 49 // 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. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 SkBitmap pending_background_; | 87 SkBitmap pending_background_; |
| 88 | 88 |
| 89 // What we should set the preferred width to once the ExtensionView has | 89 // What we should set the preferred width to once the ExtensionView has |
| 90 // loaded. | 90 // loaded. |
| 91 int pending_preferred_width_; | 91 int pending_preferred_width_; |
| 92 | 92 |
| 93 // The container this view is in (not necessarily its direct superview). | 93 // The container this view is in (not necessarily its direct superview). |
| 94 // Note: the view does not own its container. | 94 // Note: the view does not own its container. |
| 95 ExtensionContainer* container_; | 95 ExtensionContainer* container_; |
| 96 | 96 |
| 97 // Whether the RenderView has inserted extension css into toolstrip page. | 97 // Whether the RenderView has finished loading. |
| 98 bool did_insert_css_; | 98 bool did_stop_loading_; |
| 99 | 99 |
| 100 // Whether this extension view is clipped. | 100 // Whether this extension view is clipped. |
| 101 bool is_clipped_; | 101 bool is_clipped_; |
| 102 | 102 |
| 103 // Whether this view is currently displaying in toolstrip mode. | 103 // Whether this view is currently displaying in toolstrip mode. |
| 104 bool is_toolstrip_; | 104 bool is_toolstrip_; |
| 105 | 105 |
| 106 DISALLOW_COPY_AND_ASSIGN(ExtensionView); | 106 DISALLOW_COPY_AND_ASSIGN(ExtensionView); |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 #endif // CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_ | 109 #endif // CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_ |
| OLD | NEW |