OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 // Overridden from ui::GestureEventHelper. | 137 // Overridden from ui::GestureEventHelper. |
138 bool CanDispatchToConsumer(ui::GestureConsumer* consumer) override; | 138 bool CanDispatchToConsumer(ui::GestureConsumer* consumer) override; |
139 void DispatchGestureEvent(ui::GestureEvent* event) override; | 139 void DispatchGestureEvent(ui::GestureEvent* event) override; |
140 void DispatchCancelTouchEvent(ui::TouchEvent* event) override; | 140 void DispatchCancelTouchEvent(ui::TouchEvent* event) override; |
141 | 141 |
142 protected: | 142 protected: |
143 friend class RenderWidgetHostView; | 143 friend class RenderWidgetHostView; |
144 | 144 |
145 private: | 145 private: |
| 146 |
| 147 // Clears current compositor surface, if one is in use. |
| 148 void ClearSurfaceIfNecessary(); |
| 149 |
146 // Destroys this view without calling |Destroy| on |platform_view_|. | 150 // Destroys this view without calling |Destroy| on |platform_view_|. |
147 void DestroyGuestView(); | 151 void DestroyGuestView(); |
148 | 152 |
149 // Builds and forwards a WebKitGestureEvent to the renderer. | 153 // Builds and forwards a WebKitGestureEvent to the renderer. |
150 bool ForwardGestureEventToRenderer(ui::GestureEvent* gesture); | 154 bool ForwardGestureEventToRenderer(ui::GestureEvent* gesture); |
151 | 155 |
152 // Process all of the given gestures (passes them on to renderer) | 156 // Process all of the given gestures (passes them on to renderer) |
153 void ProcessGestures(ui::GestureRecognizer::Gestures* gestures); | 157 void ProcessGestures(ui::GestureRecognizer::Gestures* gestures); |
154 | 158 |
155 RenderWidgetHostViewBase* GetOwnerRenderWidgetHostView() const; | 159 RenderWidgetHostViewBase* GetOwnerRenderWidgetHostView() const; |
(...skipping 13 matching lines...) Expand all Loading... |
169 base::WeakPtr<RenderWidgetHostViewBase> platform_view_; | 173 base::WeakPtr<RenderWidgetHostViewBase> platform_view_; |
170 #if defined(USE_AURA) | 174 #if defined(USE_AURA) |
171 scoped_ptr<ui::GestureRecognizer> gesture_recognizer_; | 175 scoped_ptr<ui::GestureRecognizer> gesture_recognizer_; |
172 #endif | 176 #endif |
173 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewGuest); | 177 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewGuest); |
174 }; | 178 }; |
175 | 179 |
176 } // namespace content | 180 } // namespace content |
177 | 181 |
178 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ | 182 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ |
OLD | NEW |