| 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 22 matching lines...) Expand all Loading... |
| 33 #include "ui/aura/client/focus_change_observer.h" | 33 #include "ui/aura/client/focus_change_observer.h" |
| 34 #include "ui/aura/window_delegate.h" | 34 #include "ui/aura/window_delegate.h" |
| 35 #include "ui/aura/window_tree_host_observer.h" | 35 #include "ui/aura/window_tree_host_observer.h" |
| 36 #include "ui/base/ime/text_input_client.h" | 36 #include "ui/base/ime/text_input_client.h" |
| 37 #include "ui/compositor/compositor.h" | 37 #include "ui/compositor/compositor.h" |
| 38 #include "ui/compositor/compositor_observer.h" | 38 #include "ui/compositor/compositor_observer.h" |
| 39 #include "ui/compositor/compositor_vsync_manager.h" | 39 #include "ui/compositor/compositor_vsync_manager.h" |
| 40 #include "ui/compositor/layer_owner_delegate.h" | 40 #include "ui/compositor/layer_owner_delegate.h" |
| 41 #include "ui/gfx/display_observer.h" | 41 #include "ui/gfx/display_observer.h" |
| 42 #include "ui/gfx/rect.h" | 42 #include "ui/gfx/rect.h" |
| 43 #include "ui/keyboard/keyboard_controller_observer.h" |
| 43 #include "ui/wm/public/activation_change_observer.h" | 44 #include "ui/wm/public/activation_change_observer.h" |
| 44 #include "ui/wm/public/activation_delegate.h" | 45 #include "ui/wm/public/activation_delegate.h" |
| 45 | 46 |
| 46 namespace aura { | 47 namespace aura { |
| 47 class WindowTracker; | 48 class WindowTracker; |
| 48 namespace client { | 49 namespace client { |
| 49 class ScopedTooltipDisabler; | 50 class ScopedTooltipDisabler; |
| 50 } | 51 } |
| 51 } | 52 } |
| 52 | 53 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 public aura::WindowTreeHostObserver, | 95 public aura::WindowTreeHostObserver, |
| 95 public aura::WindowDelegate, | 96 public aura::WindowDelegate, |
| 96 public aura::client::ActivationDelegate, | 97 public aura::client::ActivationDelegate, |
| 97 public aura::client::ActivationChangeObserver, | 98 public aura::client::ActivationChangeObserver, |
| 98 public aura::client::FocusChangeObserver, | 99 public aura::client::FocusChangeObserver, |
| 99 public aura::client::CursorClientObserver, | 100 public aura::client::CursorClientObserver, |
| 100 public ImageTransportFactoryObserver, | 101 public ImageTransportFactoryObserver, |
| 101 public BrowserAccessibilityDelegate, | 102 public BrowserAccessibilityDelegate, |
| 102 public DelegatedFrameEvictorClient, | 103 public DelegatedFrameEvictorClient, |
| 103 public base::SupportsWeakPtr<RenderWidgetHostViewAura>, | 104 public base::SupportsWeakPtr<RenderWidgetHostViewAura>, |
| 104 public cc::DelegatedFrameResourceCollectionClient { | 105 public cc::DelegatedFrameResourceCollectionClient, |
| 106 public keyboard::KeyboardControllerObserver { |
| 105 public: | 107 public: |
| 106 // Displays and controls touch editing elements such as selection handles. | 108 // Displays and controls touch editing elements such as selection handles. |
| 107 class TouchEditingClient { | 109 class TouchEditingClient { |
| 108 public: | 110 public: |
| 109 TouchEditingClient() {} | 111 TouchEditingClient() {} |
| 110 | 112 |
| 111 // Tells the client to start showing touch editing handles. | 113 // Tells the client to start showing touch editing handles. |
| 112 virtual void StartTouchEditing() = 0; | 114 virtual void StartTouchEditing() = 0; |
| 113 | 115 |
| 114 // Notifies the client that touch editing is no longer needed. |quick| | 116 // Notifies the client that touch editing is no longer needed. |quick| |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 bool has_horizontal_scrollbar) OVERRIDE; | 236 bool has_horizontal_scrollbar) OVERRIDE; |
| 235 virtual void SetScrollOffsetPinning( | 237 virtual void SetScrollOffsetPinning( |
| 236 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; | 238 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; |
| 237 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; | 239 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; |
| 238 virtual void CreateBrowserAccessibilityManagerIfNeeded() OVERRIDE; | 240 virtual void CreateBrowserAccessibilityManagerIfNeeded() OVERRIDE; |
| 239 virtual bool LockMouse() OVERRIDE; | 241 virtual bool LockMouse() OVERRIDE; |
| 240 virtual void UnlockMouse() OVERRIDE; | 242 virtual void UnlockMouse() OVERRIDE; |
| 241 virtual void OnSwapCompositorFrame( | 243 virtual void OnSwapCompositorFrame( |
| 242 uint32 output_surface_id, | 244 uint32 output_surface_id, |
| 243 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; | 245 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; |
| 246 virtual float GetOverdrawBottomHeight() const OVERRIDE; |
| 244 #if defined(OS_WIN) | 247 #if defined(OS_WIN) |
| 245 virtual void SetParentNativeViewAccessible( | 248 virtual void SetParentNativeViewAccessible( |
| 246 gfx::NativeViewAccessible accessible_parent) OVERRIDE; | 249 gfx::NativeViewAccessible accessible_parent) OVERRIDE; |
| 247 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const OVERRIDE; | 250 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const OVERRIDE; |
| 248 #endif | 251 #endif |
| 249 | 252 |
| 250 // Overridden from ui::TextInputClient: | 253 // Overridden from ui::TextInputClient: |
| 251 virtual void SetCompositionText( | 254 virtual void SetCompositionText( |
| 252 const ui::CompositionText& composition) OVERRIDE; | 255 const ui::CompositionText& composition) OVERRIDE; |
| 253 virtual void ConfirmCompositionText() OVERRIDE; | 256 virtual void ConfirmCompositionText() OVERRIDE; |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 | 385 |
| 383 // Overridden from ui::CompositorVSyncManager::Observer: | 386 // Overridden from ui::CompositorVSyncManager::Observer: |
| 384 virtual void OnUpdateVSyncParameters(base::TimeTicks timebase, | 387 virtual void OnUpdateVSyncParameters(base::TimeTicks timebase, |
| 385 base::TimeDelta interval) OVERRIDE; | 388 base::TimeDelta interval) OVERRIDE; |
| 386 virtual SkBitmap::Config PreferredReadbackFormat() OVERRIDE; | 389 virtual SkBitmap::Config PreferredReadbackFormat() OVERRIDE; |
| 387 | 390 |
| 388 // Overridden from ui::LayerOwnerObserver: | 391 // Overridden from ui::LayerOwnerObserver: |
| 389 virtual void OnLayerRecreated(ui::Layer* old_layer, | 392 virtual void OnLayerRecreated(ui::Layer* old_layer, |
| 390 ui::Layer* new_layer) OVERRIDE; | 393 ui::Layer* new_layer) OVERRIDE; |
| 391 | 394 |
| 395 // Overridded from keyboard::KeyboardControllerObserver: |
| 396 virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) OVERRIDE; |
| 397 |
| 392 private: | 398 private: |
| 393 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SetCompositionText); | 399 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SetCompositionText); |
| 394 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventState); | 400 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventState); |
| 395 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventSyncAsync); | 401 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventSyncAsync); |
| 396 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SwapNotifiesWindow); | 402 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SwapNotifiesWindow); |
| 397 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | 403 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, |
| 398 SkippedDelegatedFrames); | 404 SkippedDelegatedFrames); |
| 399 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, OutputSurfaceIdChange); | 405 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, OutputSurfaceIdChange); |
| 400 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | 406 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, |
| 401 DiscardDelegatedFrames); | 407 DiscardDelegatedFrames); |
| 402 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | 408 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, |
| 403 DiscardDelegatedFramesWithLocking); | 409 DiscardDelegatedFramesWithLocking); |
| 404 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SoftwareDPIChange); | 410 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SoftwareDPIChange); |
| 405 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | 411 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, |
| 406 UpdateCursorIfOverSelf); | 412 UpdateCursorIfOverSelf); |
| 407 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraCopyRequestTest, | 413 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraCopyRequestTest, |
| 408 DestroyedAfterCopyRequest); | 414 DestroyedAfterCopyRequest); |
| 415 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraKeyboardTest, |
| 416 OverscrollTest); |
| 409 | 417 |
| 410 class WindowObserver; | 418 class WindowObserver; |
| 411 friend class WindowObserver; | 419 friend class WindowObserver; |
| 412 | 420 |
| 413 // Overridden from ImageTransportFactoryObserver: | 421 // Overridden from ImageTransportFactoryObserver: |
| 414 virtual void OnLostResources() OVERRIDE; | 422 virtual void OnLostResources() OVERRIDE; |
| 415 | 423 |
| 416 // Overridden from BrowserAccessibilityDelegate: | 424 // Overridden from BrowserAccessibilityDelegate: |
| 417 virtual void SetAccessibilityFocus(int acc_obj_id) OVERRIDE; | 425 virtual void SetAccessibilityFocus(int acc_obj_id) OVERRIDE; |
| 418 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE; | 426 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE; |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 | 741 |
| 734 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 742 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
| 735 | 743 |
| 736 #if defined(OS_WIN) | 744 #if defined(OS_WIN) |
| 737 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used | 745 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used |
| 738 // for accessibility, as the container for windowless plugins like | 746 // for accessibility, as the container for windowless plugins like |
| 739 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads, | 747 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads, |
| 740 // etc. | 748 // etc. |
| 741 scoped_ptr<content::LegacyRenderWidgetHostHWND> | 749 scoped_ptr<content::LegacyRenderWidgetHostHWND> |
| 742 legacy_render_widget_host_HWND_; | 750 legacy_render_widget_host_HWND_; |
| 751 #elif defined(OS_CHROMEOS) |
| 752 // Bounds of onscreen keyboard. |
| 753 gfx::Rect virtual_keyboard_bounds_; |
| 743 #endif | 754 #endif |
| 744 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 755 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
| 745 }; | 756 }; |
| 746 | 757 |
| 747 } // namespace content | 758 } // namespace content |
| 748 | 759 |
| 749 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 760 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| OLD | NEW |