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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <string> | 10 #include <string> |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // IPC::Channel::Listener | 145 // IPC::Channel::Listener |
146 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 146 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
147 | 147 |
148 // Sends a message to the corresponding object in the renderer. | 148 // Sends a message to the corresponding object in the renderer. |
149 virtual bool Send(IPC::Message* msg) OVERRIDE; | 149 virtual bool Send(IPC::Message* msg) OVERRIDE; |
150 | 150 |
151 // Called to notify the RenderWidget that it has been hidden or restored from | 151 // Called to notify the RenderWidget that it has been hidden or restored from |
152 // having been hidden. | 152 // having been hidden. |
153 void WasHidden(); | 153 void WasHidden(); |
154 void WasRestored(); | 154 void WasRestored(); |
| 155 bool IsVisible() const { return !is_hidden_; } |
155 | 156 |
156 // Called to notify the RenderWidget that its associated native window got | 157 // Called to notify the RenderWidget that its associated native window got |
157 // focused. | 158 // focused. |
158 virtual void GotFocus(); | 159 virtual void GotFocus(); |
159 | 160 |
160 // Tells the renderer it got/lost focus. | 161 // Tells the renderer it got/lost focus. |
161 void Focus(); | 162 void Focus(); |
162 virtual void LostCapture(); | 163 virtual void LostCapture(); |
163 | 164 |
164 // Sets whether the renderer should show controls in an active state. On all | 165 // Sets whether the renderer should show controls in an active state. On all |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 | 350 |
350 // Called when the reponse to a pending mouse lock request has arrived. | 351 // Called when the reponse to a pending mouse lock request has arrived. |
351 // Returns true if |allowed| is true and the mouse has been successfully | 352 // Returns true if |allowed| is true and the mouse has been successfully |
352 // locked. | 353 // locked. |
353 bool GotResponseToLockMouseRequest(bool allowed); | 354 bool GotResponseToLockMouseRequest(bool allowed); |
354 | 355 |
355 // Called by the view in response to AcceleratedSurfaceBuffersSwapped. | 356 // Called by the view in response to AcceleratedSurfaceBuffersSwapped. |
356 static void AcknowledgeSwapBuffers(int32 route_id, int gpu_host_id); | 357 static void AcknowledgeSwapBuffers(int32 route_id, int gpu_host_id); |
357 static void AcknowledgePostSubBuffer(int32 route_id, int gpu_host_id); | 358 static void AcknowledgePostSubBuffer(int32 route_id, int gpu_host_id); |
358 | 359 |
| 360 #if defined(USE_AURA) |
| 361 // Called by the view in response to AcceleratedSurfaceSuggestDiscard. |
| 362 static void SendSurfaceDiscard(uint64 surface_id, |
| 363 int32 route_id, |
| 364 int gpu_host_id); |
| 365 #endif |
| 366 |
359 // Signals that the compositing surface was updated, e.g. after a lost context | 367 // Signals that the compositing surface was updated, e.g. after a lost context |
360 // event. | 368 // event. |
361 void CompositingSurfaceUpdated(); | 369 void CompositingSurfaceUpdated(); |
362 | 370 |
363 protected: | 371 protected: |
364 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() OVERRIDE; | 372 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() OVERRIDE; |
365 | 373 |
366 // Internal implementation of the public Forward*Event() methods. | 374 // Internal implementation of the public Forward*Event() methods. |
367 void ForwardInputEvent(const WebKit::WebInputEvent& input_event, | 375 void ForwardInputEvent(const WebKit::WebInputEvent& input_event, |
368 int event_size, bool is_keyboard_shortcut); | 376 int event_size, bool is_keyboard_shortcut); |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 734 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
727 | 735 |
728 scoped_ptr<TapSuppressionController> tap_suppression_controller_; | 736 scoped_ptr<TapSuppressionController> tap_suppression_controller_; |
729 | 737 |
730 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 738 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
731 }; | 739 }; |
732 | 740 |
733 } // namespace content | 741 } // namespace content |
734 | 742 |
735 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 743 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |