OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined(OS_MACOSX) | 9 #if defined(OS_MACOSX) |
10 #include <OpenGL/OpenGL.h> | 10 #include <OpenGL/OpenGL.h> |
11 #endif | 11 #endif |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "app/surface/transport_dib.h" | 16 #include "app/surface/transport_dib.h" |
17 #include "gfx/native_widget_types.h" | 17 #include "gfx/native_widget_types.h" |
18 #include "gfx/rect.h" | 18 #include "gfx/rect.h" |
19 #include "third_party/skia/include/core/SkBitmap.h" | 19 #include "third_party/skia/include/core/SkBitmap.h" |
| 20 #include "third_party/skia/include/core/SkColor.h" |
20 #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h" | 21 #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h" |
21 #include "third_party/WebKit/WebKit/chromium/public/WebTextInputType.h" | 22 #include "third_party/WebKit/WebKit/chromium/public/WebTextInputType.h" |
22 | 23 |
23 namespace gfx { | 24 namespace gfx { |
24 class Rect; | 25 class Rect; |
25 class Size; | 26 class Size; |
26 } | 27 } |
27 namespace IPC { | 28 namespace IPC { |
28 class Message; | 29 class Message; |
29 } | 30 } |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 virtual void AcceleratedCompositingActivated(bool activated) = 0; | 247 virtual void AcceleratedCompositingActivated(bool activated) = 0; |
247 #endif | 248 #endif |
248 | 249 |
249 #if defined(OS_WIN) | 250 #if defined(OS_WIN) |
250 virtual gfx::PluginWindowHandle GetCompositorHostWindow() = 0; | 251 virtual gfx::PluginWindowHandle GetCompositorHostWindow() = 0; |
251 virtual void WillWmDestroy() = 0; | 252 virtual void WillWmDestroy() = 0; |
252 virtual void ShowCompositorHostWindow(bool show) = 0; | 253 virtual void ShowCompositorHostWindow(bool show) = 0; |
253 #endif | 254 #endif |
254 | 255 |
255 // Toggles visual muting of the render view area. This is on when a | 256 // Toggles visual muting of the render view area. This is on when a |
256 // constrained window is showing. | 257 // constrained window is showing, for example. |color| is the shade of |
257 virtual void SetVisuallyDeemphasized(bool deemphasized) = 0; | 258 // the overlay that covers the render view. If |animate| is true, the overlay |
| 259 // gradually fades in; otherwise it takes effect immediately. To remove the |
| 260 // fade effect, pass a NULL value for |color|. In this case, |animate| is |
| 261 // ignored. |
| 262 virtual void SetVisuallyDeemphasized(const SkColor* color, bool animate) = 0; |
258 | 263 |
259 void set_popup_type(WebKit::WebPopupType popup_type) { | 264 void set_popup_type(WebKit::WebPopupType popup_type) { |
260 popup_type_ = popup_type; | 265 popup_type_ = popup_type; |
261 } | 266 } |
262 WebKit::WebPopupType popup_type() const { return popup_type_; } | 267 WebKit::WebPopupType popup_type() const { return popup_type_; } |
263 | 268 |
264 // Subclasses should override this method to do is appropriate to set | 269 // Subclasses should override this method to do is appropriate to set |
265 // the custom background for their platform. | 270 // the custom background for their platform. |
266 virtual void SetBackground(const SkBitmap& background) { | 271 virtual void SetBackground(const SkBitmap& background) { |
267 background_ = background; | 272 background_ = background; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 | 304 |
300 // The current reserved area in view coordinates where contents should not be | 305 // The current reserved area in view coordinates where contents should not be |
301 // rendered to draw the resize corner, sidebar mini tabs etc. | 306 // rendered to draw the resize corner, sidebar mini tabs etc. |
302 gfx::Rect reserved_rect_; | 307 gfx::Rect reserved_rect_; |
303 | 308 |
304 private: | 309 private: |
305 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); | 310 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); |
306 }; | 311 }; |
307 | 312 |
308 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 313 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
OLD | NEW |