OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_GTK_EXTENSIONS_EXTENSION_VIEW_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_VIEW_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_VIEW_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_VIEW_GTK_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "third_party/skia/include/core/SkBitmap.h" | 9 #include "third_party/skia/include/core/SkBitmap.h" |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
11 #include "ui/gfx/size.h" | 11 #include "ui/gfx/size.h" |
12 | 12 |
13 class Browser; | 13 class Browser; |
14 class ExtensionHost; | |
15 class SkBitmap; | 14 class SkBitmap; |
16 | 15 |
17 namespace content { | 16 namespace content { |
18 class RenderViewHost; | 17 class RenderViewHost; |
19 } | 18 } |
20 | 19 |
| 20 namespace extensions { |
| 21 class ExtensionHost; |
| 22 } |
| 23 |
21 class ExtensionViewGtk { | 24 class ExtensionViewGtk { |
22 public: | 25 public: |
23 ExtensionViewGtk(ExtensionHost* extension_host, Browser* browser); | 26 ExtensionViewGtk(extensions::ExtensionHost* extension_host, Browser* browser); |
24 | 27 |
25 class Container { | 28 class Container { |
26 public: | 29 public: |
27 virtual ~Container() {} | 30 virtual ~Container() {} |
28 virtual void OnExtensionSizeChanged(ExtensionViewGtk* view, | 31 virtual void OnExtensionSizeChanged(ExtensionViewGtk* view, |
29 const gfx::Size& new_size) {} | 32 const gfx::Size& new_size) {} |
30 }; | 33 }; |
31 | 34 |
32 void Init(); | 35 void Init(); |
33 | 36 |
(...skipping 13 matching lines...) Expand all Loading... |
47 // connection. | 50 // connection. |
48 void RenderViewCreated(); | 51 void RenderViewCreated(); |
49 | 52 |
50 content::RenderViewHost* render_view_host() const; | 53 content::RenderViewHost* render_view_host() const; |
51 | 54 |
52 private: | 55 private: |
53 void CreateWidgetHostView(); | 56 void CreateWidgetHostView(); |
54 | 57 |
55 Browser* browser_; | 58 Browser* browser_; |
56 | 59 |
57 ExtensionHost* extension_host_; | 60 extensions::ExtensionHost* extension_host_; |
58 | 61 |
59 // The background the view should have once it is initialized. This is set | 62 // The background the view should have once it is initialized. This is set |
60 // when the view has a custom background, but hasn't been initialized yet. | 63 // when the view has a custom background, but hasn't been initialized yet. |
61 SkBitmap pending_background_; | 64 SkBitmap pending_background_; |
62 | 65 |
63 // This view's container. | 66 // This view's container. |
64 Container* container_; | 67 Container* container_; |
65 | 68 |
66 DISALLOW_COPY_AND_ASSIGN(ExtensionViewGtk); | 69 DISALLOW_COPY_AND_ASSIGN(ExtensionViewGtk); |
67 }; | 70 }; |
68 | 71 |
69 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_VIEW_GTK_H_ | 72 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_VIEW_GTK_H_ |
OLD | NEW |