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