| 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 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "content/public/browser/keyboard_listener.h" | 10 #include "content/public/browser/keyboard_listener.h" |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 // Access to the implementation's IPC::Listener::OnMessageReceived. Intended | 259 // Access to the implementation's IPC::Listener::OnMessageReceived. Intended |
| 260 // only for test code. | 260 // only for test code. |
| 261 | 261 |
| 262 // Add a keyboard listener that can handle key presses without requiring | 262 // Add a keyboard listener that can handle key presses without requiring |
| 263 // focus. | 263 // focus. |
| 264 virtual void AddKeyboardListener(KeyboardListener* listener) = 0; | 264 virtual void AddKeyboardListener(KeyboardListener* listener) = 0; |
| 265 | 265 |
| 266 // Remove a keyboard listener. | 266 // Remove a keyboard listener. |
| 267 virtual void RemoveKeyboardListener(KeyboardListener* listener) = 0; | 267 virtual void RemoveKeyboardListener(KeyboardListener* listener) = 0; |
| 268 | 268 |
| 269 virtual int SyntheticScrollMessageInterval() const = 0; |
| 270 |
| 269 protected: | 271 protected: |
| 270 friend class RenderWidgetHostImpl; | 272 friend class RenderWidgetHostImpl; |
| 271 | 273 |
| 272 // Retrieves the implementation class. Intended only for code | 274 // Retrieves the implementation class. Intended only for code |
| 273 // within content/. This method is necessary because | 275 // within content/. This method is necessary because |
| 274 // RenderWidgetHost is the root of a diamond inheritance pattern, so | 276 // RenderWidgetHost is the root of a diamond inheritance pattern, so |
| 275 // subclasses inherit it virtually, which removes our ability to | 277 // subclasses inherit it virtually, which removes our ability to |
| 276 // static_cast to the subclass. | 278 // static_cast to the subclass. |
| 277 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 279 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; |
| 278 }; | 280 }; |
| 279 | 281 |
| 280 } // namespace content | 282 } // namespace content |
| 281 | 283 |
| 282 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 284 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
| OLD | NEW |