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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 struct WebPluginGeometry; | 56 struct WebPluginGeometry; |
57 struct NativeWebKeyboardEvent; | 57 struct NativeWebKeyboardEvent; |
58 | 58 |
59 // Basic implementation shared by concrete RenderWidgetHostView subclasses. | 59 // Basic implementation shared by concrete RenderWidgetHostView subclasses. |
60 class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, | 60 class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, |
61 public IPC::Listener { | 61 public IPC::Listener { |
62 public: | 62 public: |
63 virtual ~RenderWidgetHostViewBase(); | 63 virtual ~RenderWidgetHostViewBase(); |
64 | 64 |
65 // RenderWidgetHostView implementation. | 65 // RenderWidgetHostView implementation. |
66 virtual void SetBackground(const SkBitmap& background) OVERRIDE; | 66 virtual void SetBackgroundOpaque(bool opaque) OVERRIDE; |
67 virtual const SkBitmap& GetBackground() OVERRIDE; | 67 virtual bool GetBackgroundOpaque() OVERRIDE; |
68 virtual ui::TextInputClient* GetTextInputClient() OVERRIDE; | 68 virtual ui::TextInputClient* GetTextInputClient() OVERRIDE; |
69 virtual bool IsShowingContextMenu() const OVERRIDE; | 69 virtual bool IsShowingContextMenu() const OVERRIDE; |
70 virtual void SetShowingContextMenu(bool showing_menu) OVERRIDE; | 70 virtual void SetShowingContextMenu(bool showing_menu) OVERRIDE; |
71 virtual base::string16 GetSelectedText() const OVERRIDE; | 71 virtual base::string16 GetSelectedText() const OVERRIDE; |
72 virtual bool IsMouseLocked() OVERRIDE; | 72 virtual bool IsMouseLocked() OVERRIDE; |
73 virtual gfx::Size GetVisibleViewportSize() const OVERRIDE; | 73 virtual gfx::Size GetVisibleViewportSize() const OVERRIDE; |
74 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; | 74 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; |
75 virtual void BeginFrameSubscription( | 75 virtual void BeginFrameSubscription( |
76 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) OVERRIDE; | 76 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) OVERRIDE; |
77 virtual void EndFrameSubscription() OVERRIDE; | 77 virtual void EndFrameSubscription() OVERRIDE; |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 372 |
373 // 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 |
374 // crashes in Windowed plugins. | 374 // crashes in Windowed plugins. |
375 static void DetachPluginsHelper(HWND parent); | 375 static void DetachPluginsHelper(HWND parent); |
376 #endif | 376 #endif |
377 | 377 |
378 // 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, |
379 // autofill...). | 379 // autofill...). |
380 blink::WebPopupType popup_type_; | 380 blink::WebPopupType popup_type_; |
381 | 381 |
382 // A custom background to paint behind the web content. This will be tiled | 382 // When false, the background of the web content is not fully opaque. |
383 // horizontally. Can be null, in which case we fall back to painting white. | 383 bool background_opaque_; |
384 SkBitmap background_; | |
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 30 matching lines...) Expand all Loading... |
425 uint32 renderer_frame_number_; | 424 uint32 renderer_frame_number_; |
426 | 425 |
427 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; | 426 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; |
428 | 427 |
429 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 428 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
430 }; | 429 }; |
431 | 430 |
432 } // namespace content | 431 } // namespace content |
433 | 432 |
434 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 433 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
OLD | NEW |