| 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_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 virtual void RestartHangMonitorTimeout() = 0; | 253 virtual void RestartHangMonitorTimeout() = 0; |
| 254 | 254 |
| 255 virtual void SetIgnoreInputEvents(bool ignore_input_events) = 0; | 255 virtual void SetIgnoreInputEvents(bool ignore_input_events) = 0; |
| 256 | 256 |
| 257 // Stops loading the page. | 257 // Stops loading the page. |
| 258 virtual void Stop() = 0; | 258 virtual void Stop() = 0; |
| 259 | 259 |
| 260 // Called to notify the RenderWidget that it has been resized. | 260 // Called to notify the RenderWidget that it has been resized. |
| 261 virtual void WasResized() = 0; | 261 virtual void WasResized() = 0; |
| 262 | 262 |
| 263 // Access to the implementation's | 263 // Access to the implementation's IPC::Listener::OnMessageReceived. Intended |
| 264 // IPC::Channel::Listener::OnMessageReceived. Intended only for | 264 // only for test code. |
| 265 // test code. | |
| 266 | 265 |
| 267 // Add a keyboard listener that can handle key presses without requiring | 266 // Add a keyboard listener that can handle key presses without requiring |
| 268 // focus. | 267 // focus. |
| 269 virtual void AddKeyboardListener(KeyboardListener* listener) = 0; | 268 virtual void AddKeyboardListener(KeyboardListener* listener) = 0; |
| 270 | 269 |
| 271 // Remove a keyboard listener. | 270 // Remove a keyboard listener. |
| 272 virtual void RemoveKeyboardListener(KeyboardListener* listener) = 0; | 271 virtual void RemoveKeyboardListener(KeyboardListener* listener) = 0; |
| 273 | 272 |
| 274 // Update the device scale factor. | 273 // Update the device scale factor. |
| 275 virtual void SetDeviceScaleFactor(float scale) = 0; | 274 virtual void SetDeviceScaleFactor(float scale) = 0; |
| 276 | 275 |
| 277 protected: | 276 protected: |
| 278 friend class RenderWidgetHostImpl; | 277 friend class RenderWidgetHostImpl; |
| 279 | 278 |
| 280 // Retrieves the implementation class. Intended only for code | 279 // Retrieves the implementation class. Intended only for code |
| 281 // within content/. This method is necessary because | 280 // within content/. This method is necessary because |
| 282 // RenderWidgetHost is the root of a diamond inheritance pattern, so | 281 // RenderWidgetHost is the root of a diamond inheritance pattern, so |
| 283 // subclasses inherit it virtually, which removes our ability to | 282 // subclasses inherit it virtually, which removes our ability to |
| 284 // static_cast to the subclass. | 283 // static_cast to the subclass. |
| 285 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 284 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; |
| 286 }; | 285 }; |
| 287 | 286 |
| 288 } // namespace content | 287 } // namespace content |
| 289 | 288 |
| 290 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 289 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
| OLD | NEW |