OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
7 | 7 |
8 #include "base/gfx/native_widget_types.h" | 8 #include "base/gfx/native_widget_types.h" |
9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
10 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; | 144 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; |
145 | 145 |
146 #if defined(OS_MACOSX) | 146 #if defined(OS_MACOSX) |
147 // Display a native control popup menu for WebKit. | 147 // Display a native control popup menu for WebKit. |
148 virtual void ShowPopupWithItems(gfx::Rect bounds, | 148 virtual void ShowPopupWithItems(gfx::Rect bounds, |
149 int item_height, | 149 int item_height, |
150 int selected_item, | 150 int selected_item, |
151 const std::vector<WebMenuItem>& items) = 0; | 151 const std::vector<WebMenuItem>& items) = 0; |
152 #endif | 152 #endif |
153 | 153 |
| 154 #if defined(OS_LINUX) |
| 155 virtual gfx::PluginWindowHandle CreatePluginContainer() = 0; |
| 156 virtual void DestroyPluginContainer(gfx::PluginWindowHandle container) = 0; |
| 157 #endif |
| 158 |
154 void set_activatable(bool activatable) { | 159 void set_activatable(bool activatable) { |
155 activatable_ = activatable; | 160 activatable_ = activatable; |
156 } | 161 } |
157 bool activatable() const { return activatable_; } | 162 bool activatable() const { return activatable_; } |
158 | 163 |
159 // Subclasses should override this method to do whatever is appropriate to set | 164 // Subclasses should override this method to do whatever is appropriate to set |
160 // the custom background for their platform. | 165 // the custom background for their platform. |
161 virtual void SetBackground(const SkBitmap& background) { | 166 virtual void SetBackground(const SkBitmap& background) { |
162 background_ = background; | 167 background_ = background; |
163 } | 168 } |
164 const SkBitmap& background() const { return background_; } | 169 const SkBitmap& background() const { return background_; } |
165 | 170 |
166 protected: | 171 protected: |
167 // Interface class only, do not construct. | 172 // Interface class only, do not construct. |
168 RenderWidgetHostView() : activatable_(true) {} | 173 RenderWidgetHostView() : activatable_(true) {} |
169 | 174 |
170 // Whether the window can be activated. Autocomplete popup windows for example | 175 // Whether the window can be activated. Autocomplete popup windows for example |
171 // cannot be activated. Default is true. | 176 // cannot be activated. Default is true. |
172 bool activatable_; | 177 bool activatable_; |
173 | 178 |
174 // A custom background to paint behind the web content. This will be tiled | 179 // A custom background to paint behind the web content. This will be tiled |
175 // horizontally. Can be null, in which case we fall back to painting white. | 180 // horizontally. Can be null, in which case we fall back to painting white. |
176 SkBitmap background_; | 181 SkBitmap background_; |
177 | 182 |
178 private: | 183 private: |
179 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); | 184 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); |
180 }; | 185 }; |
181 | 186 |
182 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 187 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
OLD | NEW |