| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 struct WebPluginGeometry; | 55 struct WebPluginGeometry; |
| 56 struct NativeWebKeyboardEvent; | 56 struct NativeWebKeyboardEvent; |
| 57 | 57 |
| 58 // Basic implementation shared by concrete RenderWidgetHostView subclasses. | 58 // Basic implementation shared by concrete RenderWidgetHostView subclasses. |
| 59 class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, | 59 class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, |
| 60 public IPC::Listener { | 60 public IPC::Listener { |
| 61 public: | 61 public: |
| 62 virtual ~RenderWidgetHostViewBase(); | 62 virtual ~RenderWidgetHostViewBase(); |
| 63 | 63 |
| 64 // RenderWidgetHostView implementation. | 64 // RenderWidgetHostView implementation. |
| 65 virtual void SetBackground(const SkBitmap& background) OVERRIDE; | 65 virtual void SetBackgroundOpaque(bool opaque) OVERRIDE; |
| 66 virtual const SkBitmap& GetBackground() OVERRIDE; | 66 virtual const bool GetBackgroundOpaque() OVERRIDE; |
| 67 virtual bool IsShowingContextMenu() const OVERRIDE; | 67 virtual bool IsShowingContextMenu() const OVERRIDE; |
| 68 virtual void SetShowingContextMenu(bool showing_menu) OVERRIDE; | 68 virtual void SetShowingContextMenu(bool showing_menu) OVERRIDE; |
| 69 virtual base::string16 GetSelectedText() const OVERRIDE; | 69 virtual base::string16 GetSelectedText() const OVERRIDE; |
| 70 virtual bool IsMouseLocked() OVERRIDE; | 70 virtual bool IsMouseLocked() OVERRIDE; |
| 71 virtual gfx::Size GetVisibleViewportSize() const OVERRIDE; | 71 virtual gfx::Size GetVisibleViewportSize() const OVERRIDE; |
| 72 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; | 72 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; |
| 73 virtual void BeginFrameSubscription( | 73 virtual void BeginFrameSubscription( |
| 74 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) OVERRIDE; | 74 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) OVERRIDE; |
| 75 virtual void EndFrameSubscription() OVERRIDE; | 75 virtual void EndFrameSubscription() OVERRIDE; |
| 76 | 76 |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 | 370 |
| 371 // Needs to be called before the HWND backing the view goes away to avoid | 371 // Needs to be called before the HWND backing the view goes away to avoid |
| 372 // crashes in Windowed plugins. | 372 // crashes in Windowed plugins. |
| 373 static void DetachPluginsHelper(HWND parent); | 373 static void DetachPluginsHelper(HWND parent); |
| 374 #endif | 374 #endif |
| 375 | 375 |
| 376 // Whether this view is a popup and what kind of popup it is (select, | 376 // Whether this view is a popup and what kind of popup it is (select, |
| 377 // autofill...). | 377 // autofill...). |
| 378 blink::WebPopupType popup_type_; | 378 blink::WebPopupType popup_type_; |
| 379 | 379 |
| 380 // A custom background to paint behind the web content. This will be tiled | 380 // When false, the background of the web content is not fully opaque. |
| 381 // horizontally. Can be null, in which case we fall back to painting white. | 381 bool background_opaque_; |
| 382 SkBitmap background_; | |
| 383 | 382 |
| 384 // While the mouse is locked, the cursor is hidden from the user. Mouse events | 383 // While the mouse is locked, the cursor is hidden from the user. Mouse events |
| 385 // are still generated. However, the position they report is the last known | 384 // are still generated. However, the position they report is the last known |
| 386 // mouse position just as mouse lock was entered; the movement they report | 385 // mouse position just as mouse lock was entered; the movement they report |
| 387 // indicates what the change in position of the mouse would be had it not been | 386 // indicates what the change in position of the mouse would be had it not been |
| 388 // locked. | 387 // locked. |
| 389 bool mouse_locked_; | 388 bool mouse_locked_; |
| 390 | 389 |
| 391 // Whether we are showing a context menu. | 390 // Whether we are showing a context menu. |
| 392 bool showing_context_menu_; | 391 bool showing_context_menu_; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 420 uint32 renderer_frame_number_; | 419 uint32 renderer_frame_number_; |
| 421 | 420 |
| 422 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; | 421 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; |
| 423 | 422 |
| 424 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 423 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
| 425 }; | 424 }; |
| 426 | 425 |
| 427 } // namespace content | 426 } // namespace content |
| 428 | 427 |
| 429 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 428 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| OLD | NEW |