OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <string> | 10 #include <string> |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 170 |
171 // Called when a renderer object already been created for this host, and we | 171 // Called when a renderer object already been created for this host, and we |
172 // just need to be attached to it. Used for window.open, <select> dropdown | 172 // just need to be attached to it. Used for window.open, <select> dropdown |
173 // menus, and other times when the renderer initiates creating an object. | 173 // menus, and other times when the renderer initiates creating an object. |
174 void Init(); | 174 void Init(); |
175 | 175 |
176 // Tells the renderer to die and then calls Destroy(). | 176 // Tells the renderer to die and then calls Destroy(). |
177 virtual void Shutdown(); | 177 virtual void Shutdown(); |
178 | 178 |
179 // Manual RTTI FTW. We are not hosting a web page. | 179 // Manual RTTI FTW. We are not hosting a web page. |
180 virtual bool IsRenderView() const { return false; } | 180 virtual bool IsRenderView() const; |
181 | 181 |
182 // IPC::Channel::Listener | 182 // IPC::Channel::Listener |
183 virtual void OnMessageReceived(const IPC::Message& msg); | 183 virtual void OnMessageReceived(const IPC::Message& msg); |
184 | 184 |
185 // Sends a message to the corresponding object in the renderer. | 185 // Sends a message to the corresponding object in the renderer. |
186 virtual bool Send(IPC::Message* msg); | 186 virtual bool Send(IPC::Message* msg); |
187 | 187 |
188 // Called to notify the RenderWidget that it has been hidden or restored from | 188 // Called to notify the RenderWidget that it has been hidden or restored from |
189 // having been hidden. | 189 // having been hidden. |
190 void WasHidden(); | 190 void WasHidden(); |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 // This is used for various IPC messages, including plugins. | 421 // This is used for various IPC messages, including plugins. |
422 gfx::NativeViewId GetNativeViewId(); | 422 gfx::NativeViewId GetNativeViewId(); |
423 | 423 |
424 // Called to handled a keyboard event before sending it to the renderer. | 424 // Called to handled a keyboard event before sending it to the renderer. |
425 // This is overridden by RenderView to send upwards to its delegate. | 425 // This is overridden by RenderView to send upwards to its delegate. |
426 // Returns true if the event was handled, and then the keyboard event will | 426 // Returns true if the event was handled, and then the keyboard event will |
427 // not be sent to the renderer anymore. Otherwise, if the |event| would | 427 // not be sent to the renderer anymore. Otherwise, if the |event| would |
428 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut, | 428 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut, |
429 // |*is_keyboard_shortcut| should be set to true. | 429 // |*is_keyboard_shortcut| should be set to true. |
430 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 430 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
431 bool* is_keyboard_shortcut) { | 431 bool* is_keyboard_shortcut); |
432 return false; | |
433 } | |
434 | 432 |
435 // Called when a keyboard event was not processed by the renderer. This is | 433 // Called when a keyboard event was not processed by the renderer. This is |
436 // overridden by RenderView to send upwards to its delegate. | 434 // overridden by RenderView to send upwards to its delegate. |
437 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event) {} | 435 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event) {} |
438 | 436 |
439 // Notification that the user has made some kind of input that could | 437 // Notification that the user has made some kind of input that could |
440 // perform an action. The render view host overrides this to forward the | 438 // perform an action. The render view host overrides this to forward the |
441 // information to its delegate (see corresponding function in | 439 // information to its delegate (see corresponding function in |
442 // RenderViewHostDelegate). The gestures that count are 1) any mouse down | 440 // RenderViewHostDelegate). The gestures that count are 1) any mouse down |
443 // event and 2) enter or space key presses. | 441 // event and 2) enter or space key presses. |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 // switching back to the original tab, because the content may already be | 683 // switching back to the original tab, because the content may already be |
686 // changed. | 684 // changed. |
687 bool suppress_next_char_events_; | 685 bool suppress_next_char_events_; |
688 | 686 |
689 std::vector<gfx::PluginWindowHandle> deferred_plugin_handles_; | 687 std::vector<gfx::PluginWindowHandle> deferred_plugin_handles_; |
690 | 688 |
691 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); | 689 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); |
692 }; | 690 }; |
693 | 691 |
694 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 692 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
OLD | NEW |