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 CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
7 | 7 |
8 #if defined(OS_MACOSX) | 8 #if defined(OS_MACOSX) |
9 #include <OpenGL/OpenGL.h> | 9 #include <OpenGL/OpenGL.h> |
10 #endif | 10 #endif |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 typedef const base::Callback<void(bool, const SkBitmap&)> | 62 typedef const base::Callback<void(bool, const SkBitmap&)> |
63 CopyFromCompositingSurfaceCallback; | 63 CopyFromCompositingSurfaceCallback; |
64 | 64 |
65 // Basic implementation shared by concrete RenderWidgetHostView subclasses. | 65 // Basic implementation shared by concrete RenderWidgetHostView subclasses. |
66 class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, | 66 class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, |
67 public IPC::Listener { | 67 public IPC::Listener { |
68 public: | 68 public: |
69 ~RenderWidgetHostViewBase() override; | 69 ~RenderWidgetHostViewBase() override; |
70 | 70 |
71 // RenderWidgetHostView implementation. | 71 // RenderWidgetHostView implementation. |
72 void SetBackgroundOpaque(bool opaque) override; | 72 void SetBackgroundColor(SkColor color) override; |
| 73 void SetBackgroundColorToDefault() final override; |
73 bool GetBackgroundOpaque() override; | 74 bool GetBackgroundOpaque() override; |
74 ui::TextInputClient* GetTextInputClient() override; | 75 ui::TextInputClient* GetTextInputClient() override; |
75 bool IsShowingContextMenu() const override; | 76 bool IsShowingContextMenu() const override; |
76 void SetShowingContextMenu(bool showing_menu) override; | 77 void SetShowingContextMenu(bool showing_menu) override; |
77 base::string16 GetSelectedText() const override; | 78 base::string16 GetSelectedText() const override; |
78 bool IsMouseLocked() override; | 79 bool IsMouseLocked() override; |
79 gfx::Size GetVisibleViewportSize() const override; | 80 gfx::Size GetVisibleViewportSize() const override; |
80 void SetInsets(const gfx::Insets& insets) override; | 81 void SetInsets(const gfx::Insets& insets) override; |
81 void BeginFrameSubscription( | 82 void BeginFrameSubscription( |
82 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override; | 83 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override; |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 | 374 |
374 // Needs to be called before the HWND backing the view goes away to avoid | 375 // Needs to be called before the HWND backing the view goes away to avoid |
375 // crashes in Windowed plugins. | 376 // crashes in Windowed plugins. |
376 static void DetachPluginsHelper(HWND parent); | 377 static void DetachPluginsHelper(HWND parent); |
377 #endif | 378 #endif |
378 | 379 |
379 // Whether this view is a popup and what kind of popup it is (select, | 380 // Whether this view is a popup and what kind of popup it is (select, |
380 // autofill...). | 381 // autofill...). |
381 blink::WebPopupType popup_type_; | 382 blink::WebPopupType popup_type_; |
382 | 383 |
383 // When false, the background of the web content is not fully opaque. | 384 // The background color of the web content. |
384 bool background_opaque_; | 385 SkColor background_color_; |
385 | 386 |
386 // While the mouse is locked, the cursor is hidden from the user. Mouse events | 387 // While the mouse is locked, the cursor is hidden from the user. Mouse events |
387 // are still generated. However, the position they report is the last known | 388 // are still generated. However, the position they report is the last known |
388 // mouse position just as mouse lock was entered; the movement they report | 389 // mouse position just as mouse lock was entered; the movement they report |
389 // indicates what the change in position of the mouse would be had it not been | 390 // indicates what the change in position of the mouse would be had it not been |
390 // locked. | 391 // locked. |
391 bool mouse_locked_; | 392 bool mouse_locked_; |
392 | 393 |
393 // Whether we are showing a context menu. | 394 // Whether we are showing a context menu. |
394 bool showing_context_menu_; | 395 bool showing_context_menu_; |
(...skipping 29 matching lines...) Expand all Loading... |
424 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; | 425 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; |
425 | 426 |
426 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; | 427 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; |
427 | 428 |
428 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 429 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
429 }; | 430 }; |
430 | 431 |
431 } // namespace content | 432 } // namespace content |
432 | 433 |
433 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 434 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
OLD | NEW |