| 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_AURA_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "content/browser/compositor/owned_mailbox.h" | 24 #include "content/browser/compositor/owned_mailbox.h" |
| 25 #include "content/browser/renderer_host/delegated_frame_evictor.h" | 25 #include "content/browser/renderer_host/delegated_frame_evictor.h" |
| 26 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 26 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 27 #include "content/browser/renderer_host/software_frame_manager.h" | 27 #include "content/browser/renderer_host/software_frame_manager.h" |
| 28 #include "content/common/content_export.h" | 28 #include "content/common/content_export.h" |
| 29 #include "content/common/cursors/webcursor.h" | 29 #include "content/common/cursors/webcursor.h" |
| 30 #include "content/common/gpu/client/gl_helper.h" | 30 #include "content/common/gpu/client/gl_helper.h" |
| 31 #include "third_party/skia/include/core/SkRegion.h" | 31 #include "third_party/skia/include/core/SkRegion.h" |
| 32 #include "ui/aura/client/cursor_client_observer.h" | 32 #include "ui/aura/client/cursor_client_observer.h" |
| 33 #include "ui/aura/client/focus_change_observer.h" | 33 #include "ui/aura/client/focus_change_observer.h" |
| 34 #include "ui/aura/client/virtual_keyboard_observer.h" |
| 34 #include "ui/aura/window_delegate.h" | 35 #include "ui/aura/window_delegate.h" |
| 35 #include "ui/aura/window_tree_host_observer.h" | 36 #include "ui/aura/window_tree_host_observer.h" |
| 36 #include "ui/base/ime/text_input_client.h" | 37 #include "ui/base/ime/text_input_client.h" |
| 37 #include "ui/compositor/compositor.h" | 38 #include "ui/compositor/compositor.h" |
| 38 #include "ui/compositor/compositor_observer.h" | 39 #include "ui/compositor/compositor_observer.h" |
| 39 #include "ui/compositor/compositor_vsync_manager.h" | 40 #include "ui/compositor/compositor_vsync_manager.h" |
| 40 #include "ui/gfx/display_observer.h" | 41 #include "ui/gfx/display_observer.h" |
| 41 #include "ui/gfx/rect.h" | 42 #include "ui/gfx/rect.h" |
| 42 #include "ui/wm/public/activation_change_observer.h" | 43 #include "ui/wm/public/activation_change_observer.h" |
| 43 #include "ui/wm/public/activation_delegate.h" | 44 #include "ui/wm/public/activation_delegate.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 public ui::CompositorObserver, | 88 public ui::CompositorObserver, |
| 88 public ui::CompositorVSyncManager::Observer, | 89 public ui::CompositorVSyncManager::Observer, |
| 89 public ui::TextInputClient, | 90 public ui::TextInputClient, |
| 90 public gfx::DisplayObserver, | 91 public gfx::DisplayObserver, |
| 91 public aura::WindowTreeHostObserver, | 92 public aura::WindowTreeHostObserver, |
| 92 public aura::WindowDelegate, | 93 public aura::WindowDelegate, |
| 93 public aura::client::ActivationDelegate, | 94 public aura::client::ActivationDelegate, |
| 94 public aura::client::ActivationChangeObserver, | 95 public aura::client::ActivationChangeObserver, |
| 95 public aura::client::FocusChangeObserver, | 96 public aura::client::FocusChangeObserver, |
| 96 public aura::client::CursorClientObserver, | 97 public aura::client::CursorClientObserver, |
| 98 public aura::client::VirtualKeyboardObserver, |
| 97 public ImageTransportFactoryObserver, | 99 public ImageTransportFactoryObserver, |
| 98 public BrowserAccessibilityDelegate, | 100 public BrowserAccessibilityDelegate, |
| 99 public SoftwareFrameManagerClient, | 101 public SoftwareFrameManagerClient, |
| 100 public DelegatedFrameEvictorClient, | 102 public DelegatedFrameEvictorClient, |
| 101 public base::SupportsWeakPtr<RenderWidgetHostViewAura>, | 103 public base::SupportsWeakPtr<RenderWidgetHostViewAura>, |
| 102 public cc::DelegatedFrameResourceCollectionClient { | 104 public cc::DelegatedFrameResourceCollectionClient { |
| 103 public: | 105 public: |
| 104 // Displays and controls touch editing elements such as selection handles. | 106 // Displays and controls touch editing elements such as selection handles. |
| 105 class TouchEditingClient { | 107 class TouchEditingClient { |
| 106 public: | 108 public: |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 bool has_horizontal_scrollbar) OVERRIDE; | 234 bool has_horizontal_scrollbar) OVERRIDE; |
| 233 virtual void SetScrollOffsetPinning( | 235 virtual void SetScrollOffsetPinning( |
| 234 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; | 236 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; |
| 235 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; | 237 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; |
| 236 virtual void CreateBrowserAccessibilityManagerIfNeeded() OVERRIDE; | 238 virtual void CreateBrowserAccessibilityManagerIfNeeded() OVERRIDE; |
| 237 virtual bool LockMouse() OVERRIDE; | 239 virtual bool LockMouse() OVERRIDE; |
| 238 virtual void UnlockMouse() OVERRIDE; | 240 virtual void UnlockMouse() OVERRIDE; |
| 239 virtual void OnSwapCompositorFrame( | 241 virtual void OnSwapCompositorFrame( |
| 240 uint32 output_surface_id, | 242 uint32 output_surface_id, |
| 241 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; | 243 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; |
| 244 virtual float GetOverdrawBottomHeight() const OVERRIDE; |
| 242 #if defined(OS_WIN) | 245 #if defined(OS_WIN) |
| 243 virtual void SetParentNativeViewAccessible( | 246 virtual void SetParentNativeViewAccessible( |
| 244 gfx::NativeViewAccessible accessible_parent) OVERRIDE; | 247 gfx::NativeViewAccessible accessible_parent) OVERRIDE; |
| 245 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const OVERRIDE; | 248 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const OVERRIDE; |
| 246 #endif | 249 #endif |
| 247 | 250 |
| 248 // Overridden from ui::TextInputClient: | 251 // Overridden from ui::TextInputClient: |
| 249 virtual void SetCompositionText( | 252 virtual void SetCompositionText( |
| 250 const ui::CompositionText& composition) OVERRIDE; | 253 const ui::CompositionText& composition) OVERRIDE; |
| 251 virtual void ConfirmCompositionText() OVERRIDE; | 254 virtual void ConfirmCompositionText() OVERRIDE; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 // Overridden from aura::client::ActivationDelegate: | 316 // Overridden from aura::client::ActivationDelegate: |
| 314 virtual bool ShouldActivate() const OVERRIDE; | 317 virtual bool ShouldActivate() const OVERRIDE; |
| 315 | 318 |
| 316 // Overridden from aura::client::ActivationChangeObserver: | 319 // Overridden from aura::client::ActivationChangeObserver: |
| 317 virtual void OnWindowActivated(aura::Window* gained_activation, | 320 virtual void OnWindowActivated(aura::Window* gained_activation, |
| 318 aura::Window* lost_activation) OVERRIDE; | 321 aura::Window* lost_activation) OVERRIDE; |
| 319 | 322 |
| 320 // Overridden from aura::client::CursorClientObserver: | 323 // Overridden from aura::client::CursorClientObserver: |
| 321 virtual void OnCursorVisibilityChanged(bool is_visible) OVERRIDE; | 324 virtual void OnCursorVisibilityChanged(bool is_visible) OVERRIDE; |
| 322 | 325 |
| 326 // Overridden from aura::client::VirtualKeyboardObserver: |
| 327 virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) OVERRIDE; |
| 328 |
| 323 // Overridden from aura::client::FocusChangeObserver: | 329 // Overridden from aura::client::FocusChangeObserver: |
| 324 virtual void OnWindowFocused(aura::Window* gained_focus, | 330 virtual void OnWindowFocused(aura::Window* gained_focus, |
| 325 aura::Window* lost_focus) OVERRIDE; | 331 aura::Window* lost_focus) OVERRIDE; |
| 326 | 332 |
| 327 // Overridden from aura::WindowTreeHostObserver: | 333 // Overridden from aura::WindowTreeHostObserver: |
| 328 virtual void OnHostMoved(const aura::WindowTreeHost* host, | 334 virtual void OnHostMoved(const aura::WindowTreeHost* host, |
| 329 const gfx::Point& new_origin) OVERRIDE; | 335 const gfx::Point& new_origin) OVERRIDE; |
| 330 | 336 |
| 331 // SoftwareFrameManagerClient implementation: | 337 // SoftwareFrameManagerClient implementation: |
| 332 virtual void SoftwareFrameWasFreed( | 338 virtual void SoftwareFrameWasFreed( |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 // The list of rectangles from constrained windows over this view. Windowed | 754 // The list of rectangles from constrained windows over this view. Windowed |
| 749 // NPAPI plugins shouldn't draw over them. | 755 // NPAPI plugins shouldn't draw over them. |
| 750 std::vector<gfx::Rect> constrained_rects_; | 756 std::vector<gfx::Rect> constrained_rects_; |
| 751 | 757 |
| 752 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves; | 758 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves; |
| 753 // Contains information about each windowed plugin's clip and cutout rects ( | 759 // Contains information about each windowed plugin's clip and cutout rects ( |
| 754 // from the renderer). This is needed because when the transient windoiws | 760 // from the renderer). This is needed because when the transient windoiws |
| 755 // over this view changes, we need this information in order to create a new | 761 // over this view changes, we need this information in order to create a new |
| 756 // region for the HWND. | 762 // region for the HWND. |
| 757 PluginWindowMoves plugin_window_moves_; | 763 PluginWindowMoves plugin_window_moves_; |
| 764 #elif defined(OS_CHROMEOS) |
| 765 // Bounds of onscreen keyboard. |
| 766 gfx::Rect virtual_keyboard_bounds_; |
| 758 #endif | 767 #endif |
| 759 | 768 |
| 760 base::TimeTicks last_draw_ended_; | 769 base::TimeTicks last_draw_ended_; |
| 761 | 770 |
| 762 // Subscriber that listens to frame presentation events. | 771 // Subscriber that listens to frame presentation events. |
| 763 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; | 772 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; |
| 764 std::vector<scoped_refptr<OwnedMailbox> > idle_frame_subscriber_textures_; | 773 std::vector<scoped_refptr<OwnedMailbox> > idle_frame_subscriber_textures_; |
| 765 std::set<OwnedMailbox*> active_frame_subscriber_textures_; | 774 std::set<OwnedMailbox*> active_frame_subscriber_textures_; |
| 766 | 775 |
| 767 // YUV readback pipeline. | 776 // YUV readback pipeline. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 792 // etc. | 801 // etc. |
| 793 scoped_ptr<content::LegacyRenderWidgetHostHWND> | 802 scoped_ptr<content::LegacyRenderWidgetHostHWND> |
| 794 legacy_render_widget_host_HWND_; | 803 legacy_render_widget_host_HWND_; |
| 795 #endif | 804 #endif |
| 796 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 805 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
| 797 }; | 806 }; |
| 798 | 807 |
| 799 } // namespace content | 808 } // namespace content |
| 800 | 809 |
| 801 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 810 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| OLD | NEW |