Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.h

Issue 153913004: gesture-nav: Use a WebContentsObserver to more reliably dismiss the navigation overlay. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 public aura::client::ActivationChangeObserver, 83 public aura::client::ActivationChangeObserver,
84 public aura::client::FocusChangeObserver, 84 public aura::client::FocusChangeObserver,
85 public aura::client::CursorClientObserver, 85 public aura::client::CursorClientObserver,
86 public ImageTransportFactoryObserver, 86 public ImageTransportFactoryObserver,
87 public BrowserAccessibilityDelegate, 87 public BrowserAccessibilityDelegate,
88 public SoftwareFrameManagerClient, 88 public SoftwareFrameManagerClient,
89 public DelegatedFrameEvictorClient, 89 public DelegatedFrameEvictorClient,
90 public base::SupportsWeakPtr<RenderWidgetHostViewAura>, 90 public base::SupportsWeakPtr<RenderWidgetHostViewAura>,
91 public cc::DelegatedFrameResourceCollectionClient { 91 public cc::DelegatedFrameResourceCollectionClient {
92 public: 92 public:
93 // Used to notify whenever the paint-content of the view changes.
94 class PaintObserver {
95 public:
96 PaintObserver() {}
97 virtual ~PaintObserver() {}
98
99 // This is called when painting of the page is completed.
100 virtual void OnPaintComplete() = 0;
101
102 // This is called when compositor painting of the page is completed.
103 virtual void OnCompositingComplete() = 0;
104
105 // This is called when the contents for compositor painting changes.
106 virtual void OnUpdateCompositorContent() = 0;
107
108 // This is called loading the page has completed.
109 virtual void OnPageLoadComplete() = 0;
110
111 // This is called when the view is destroyed, so that the observer can
112 // perform any necessary clean-up.
113 virtual void OnViewDestroyed() = 0;
114 };
115
116 // Displays and controls touch editing elements such as selection handles. 93 // Displays and controls touch editing elements such as selection handles.
117 class TouchEditingClient { 94 class TouchEditingClient {
118 public: 95 public:
119 TouchEditingClient() {} 96 TouchEditingClient() {}
120 97
121 // Tells the client to start showing touch editing handles. 98 // Tells the client to start showing touch editing handles.
122 virtual void StartTouchEditing() = 0; 99 virtual void StartTouchEditing() = 0;
123 100
124 // Notifies the client that touch editing is no longer needed. |quick| 101 // Notifies the client that touch editing is no longer needed. |quick|
125 // determines whether the handles should fade out quickly or slowly. 102 // determines whether the handles should fade out quickly or slowly.
(...skipping 14 matching lines...) Expand all
140 virtual void GestureEventAck(int gesture_event_type) = 0; 117 virtual void GestureEventAck(int gesture_event_type) = 0;
141 118
142 // This is called when the view is destroyed, so that the client can 119 // This is called when the view is destroyed, so that the client can
143 // perform any necessary clean-up. 120 // perform any necessary clean-up.
144 virtual void OnViewDestroyed() = 0; 121 virtual void OnViewDestroyed() = 0;
145 122
146 protected: 123 protected:
147 virtual ~TouchEditingClient() {} 124 virtual ~TouchEditingClient() {}
148 }; 125 };
149 126
150 void set_paint_observer(PaintObserver* observer) {
151 paint_observer_ = observer;
152 }
153
154 void set_touch_editing_client(TouchEditingClient* client) { 127 void set_touch_editing_client(TouchEditingClient* client) {
155 touch_editing_client_ = client; 128 touch_editing_client_ = client;
156 } 129 }
157 130
158 // RenderWidgetHostView implementation. 131 // RenderWidgetHostView implementation.
159 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 132 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
160 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; 133 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE;
161 virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; 134 virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE;
162 virtual void SetSize(const gfx::Size& size) OVERRIDE; 135 virtual void SetSize(const gfx::Size& size) OVERRIDE;
163 virtual void SetBounds(const gfx::Rect& rect) OVERRIDE; 136 virtual void SetBounds(const gfx::Rect& rect) OVERRIDE;
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 719
747 // Used to track the last cursor visibility update that was sent to the 720 // Used to track the last cursor visibility update that was sent to the
748 // renderer via NotifyRendererOfCursorVisibilityState(). 721 // renderer via NotifyRendererOfCursorVisibilityState().
749 enum CursorVisibilityState { 722 enum CursorVisibilityState {
750 UNKNOWN, 723 UNKNOWN,
751 VISIBLE, 724 VISIBLE,
752 NOT_VISIBLE, 725 NOT_VISIBLE,
753 }; 726 };
754 CursorVisibilityState cursor_visibility_state_in_renderer_; 727 CursorVisibilityState cursor_visibility_state_in_renderer_;
755 728
756 // An observer to notify that the paint content of the view has changed. The
757 // observer is not owned by the view, and must remove itself as an oberver
758 // when it is being destroyed.
759 PaintObserver* paint_observer_;
760
761 #if defined(OS_WIN) 729 #if defined(OS_WIN)
762 // The list of rectangles from constrained windows over this view. Windowed 730 // The list of rectangles from constrained windows over this view. Windowed
763 // NPAPI plugins shouldn't draw over them. 731 // NPAPI plugins shouldn't draw over them.
764 std::vector<gfx::Rect> constrained_rects_; 732 std::vector<gfx::Rect> constrained_rects_;
765 733
766 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves; 734 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves;
767 // Contains information about each windowed plugin's clip and cutout rects ( 735 // Contains information about each windowed plugin's clip and cutout rects (
768 // from the renderer). This is needed because when the transient windoiws 736 // from the renderer). This is needed because when the transient windoiws
769 // over this view changes, we need this information in order to create a new 737 // over this view changes, we need this information in order to create a new
770 // region for the HWND. 738 // region for the HWND.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 // passed to windowless plugins like Flash/Silverlight, etc as the 772 // passed to windowless plugins like Flash/Silverlight, etc as the
805 // container window. 773 // container window.
806 HWND plugin_parent_window_; 774 HWND plugin_parent_window_;
807 #endif 775 #endif
808 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 776 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
809 }; 777 };
810 778
811 } // namespace content 779 } // namespace content
812 780
813 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 781 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698