| 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_RENDER_WIDGET_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_ |
| 6 #define CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_ | 6 #define CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // An interface implemented by an object interested in knowing about the state | 27 // An interface implemented by an object interested in knowing about the state |
| 28 // of the RenderWidgetHost. | 28 // of the RenderWidgetHost. |
| 29 class CONTENT_EXPORT RenderWidgetHostDelegate { | 29 class CONTENT_EXPORT RenderWidgetHostDelegate { |
| 30 public: | 30 public: |
| 31 // The RenderWidgetHost is going to be deleted. | 31 // The RenderWidgetHost is going to be deleted. |
| 32 virtual void RenderWidgetDeleted(RenderWidgetHostImpl* render_widget_host) {} | 32 virtual void RenderWidgetDeleted(RenderWidgetHostImpl* render_widget_host) {} |
| 33 | 33 |
| 34 // The RenderWidgetHost got the focus. | 34 // The RenderWidgetHost got the focus. |
| 35 virtual void RenderWidgetGotFocus(RenderWidgetHostImpl* render_widget_host) {} | 35 virtual void RenderWidgetGotFocus(RenderWidgetHostImpl* render_widget_host) {} |
| 36 | 36 |
| 37 // The RenderWidget was resized. |
| 38 virtual void RenderWidgetWasResized( |
| 39 RenderWidgetHostImpl* render_widget_host) {} |
| 40 |
| 37 // Callback to give the browser a chance to handle the specified keyboard | 41 // Callback to give the browser a chance to handle the specified keyboard |
| 38 // event before sending it to the renderer. | 42 // event before sending it to the renderer. |
| 39 // Returns true if the |event| was handled. Otherwise, if the |event| would | 43 // Returns true if the |event| was handled. Otherwise, if the |event| would |
| 40 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut, | 44 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut, |
| 41 // |*is_keyboard_shortcut| should be set to true. | 45 // |*is_keyboard_shortcut| should be set to true. |
| 42 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 46 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
| 43 bool* is_keyboard_shortcut); | 47 bool* is_keyboard_shortcut); |
| 44 | 48 |
| 45 // Callback to inform the browser that the renderer did not process the | 49 // Callback to inform the browser that the renderer did not process the |
| 46 // specified events. This gives an opportunity to the browser to process the | 50 // specified events. This gives an opportunity to the browser to process the |
| (...skipping 29 matching lines...) Expand all Loading... |
| 76 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible(); | 80 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible(); |
| 77 #endif | 81 #endif |
| 78 | 82 |
| 79 protected: | 83 protected: |
| 80 virtual ~RenderWidgetHostDelegate() {} | 84 virtual ~RenderWidgetHostDelegate() {} |
| 81 }; | 85 }; |
| 82 | 86 |
| 83 } // namespace content | 87 } // namespace content |
| 84 | 88 |
| 85 #endif // CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_ | 89 #endif // CONTENT_BROWSER_RENDER_WIDGET_HOST_DELEGATE_H_ |
| OLD | NEW |