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_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // IPC::Listener | 148 // IPC::Listener |
149 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 149 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
150 | 150 |
151 // Sends a message to the corresponding object in the renderer. | 151 // Sends a message to the corresponding object in the renderer. |
152 virtual bool Send(IPC::Message* msg) OVERRIDE; | 152 virtual bool Send(IPC::Message* msg) OVERRIDE; |
153 | 153 |
154 // Called to notify the RenderWidget that it has been hidden or restored from | 154 // Called to notify the RenderWidget that it has been hidden or restored from |
155 // having been hidden. | 155 // having been hidden. |
156 void WasHidden(); | 156 void WasHidden(); |
157 void WasRestored(); | 157 void WasRestored(); |
| 158 bool IsHidden() const { return is_hidden_; } |
158 | 159 |
159 // Returns true if the RenderWidget is hidden. | 160 // Returns true if the RenderWidget is hidden. |
160 bool is_hidden() const { return is_hidden_; } | 161 bool is_hidden() const { return is_hidden_; } |
161 | 162 |
162 // Called to notify the RenderWidget that its associated native window got | 163 // Called to notify the RenderWidget that its associated native window got |
163 // focused. | 164 // focused. |
164 virtual void GotFocus(); | 165 virtual void GotFocus(); |
165 | 166 |
166 // Tells the renderer it got/lost focus. | 167 // Tells the renderer it got/lost focus. |
167 void Focus(); | 168 void Focus(); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 int32 route_id, | 365 int32 route_id, |
365 int gpu_host_id, | 366 int gpu_host_id, |
366 uint32 sync_point); | 367 uint32 sync_point); |
367 | 368 |
368 // Called by the view in response to AcceleratedSurfaceBuffersSwapped for | 369 // Called by the view in response to AcceleratedSurfaceBuffersSwapped for |
369 // platforms that support deferred GPU process descheduling. This does | 370 // platforms that support deferred GPU process descheduling. This does |
370 // nothing if the compositor thread is enabled. | 371 // nothing if the compositor thread is enabled. |
371 // TODO(jbates) Once the compositor thread is always on, this can be removed. | 372 // TODO(jbates) Once the compositor thread is always on, this can be removed. |
372 void AcknowledgeSwapBuffersToRenderer(); | 373 void AcknowledgeSwapBuffersToRenderer(); |
373 | 374 |
| 375 #if defined(USE_AURA) |
| 376 // Called by the view in response to visibility changes: |
| 377 // 1. After the front surface is guarenteed to no longer be in use by the ui |
| 378 // (protected false), |
| 379 // 2. When the ui expects to have a valid front surface (protected true). |
| 380 static void SendFrontSurfaceIsProtected(bool is_protected, |
| 381 uint32 protection_state_id, |
| 382 int32 route_id, |
| 383 int gpu_host_id); |
| 384 #endif |
| 385 |
374 // Signals that the compositing surface was updated, e.g. after a lost context | 386 // Signals that the compositing surface was updated, e.g. after a lost context |
375 // event. | 387 // event. |
376 void CompositingSurfaceUpdated(); | 388 void CompositingSurfaceUpdated(); |
377 | 389 |
378 void set_allow_privileged_mouse_lock(bool allow) { | 390 void set_allow_privileged_mouse_lock(bool allow) { |
379 allow_privileged_mouse_lock_ = allow; | 391 allow_privileged_mouse_lock_ = allow; |
380 } | 392 } |
381 | 393 |
382 protected: | 394 protected: |
383 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() OVERRIDE; | 395 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() OVERRIDE; |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 scoped_ptr<TapSuppressionController> tap_suppression_controller_; | 779 scoped_ptr<TapSuppressionController> tap_suppression_controller_; |
768 | 780 |
769 scoped_ptr<SmoothScrollGesture> active_smooth_scroll_gesture_; | 781 scoped_ptr<SmoothScrollGesture> active_smooth_scroll_gesture_; |
770 | 782 |
771 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 783 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
772 }; | 784 }; |
773 | 785 |
774 } // namespace content | 786 } // namespace content |
775 | 787 |
776 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 788 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |