Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RENDERER_RENDER_VIEW_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_H_ |
| 6 #define CONTENT_RENDERER_RENDER_VIEW_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 298 webkit::ppapi::PluginModule* pepper_module); | 298 webkit::ppapi::PluginModule* pepper_module); |
| 299 | 299 |
| 300 // Creates a fullscreen container for a pepper plugin instance. | 300 // Creates a fullscreen container for a pepper plugin instance. |
| 301 RenderWidgetFullscreenPepper* CreatePepperFullscreenContainer( | 301 RenderWidgetFullscreenPepper* CreatePepperFullscreenContainer( |
| 302 webkit::ppapi::PluginInstance* plugin); | 302 webkit::ppapi::PluginInstance* plugin); |
| 303 | 303 |
| 304 // Create a new plugin without checking the content settings. | 304 // Create a new plugin without checking the content settings. |
| 305 WebKit::WebPlugin* CreatePluginNoCheck(WebKit::WebFrame* frame, | 305 WebKit::WebPlugin* CreatePluginNoCheck(WebKit::WebFrame* frame, |
| 306 const WebKit::WebPluginParams& params); | 306 const WebKit::WebPluginParams& params); |
| 307 | 307 |
| 308 // Informs the render view that the given plugin has gained or lost focus. | |
| 309 void PpapiPluginFocusChanged(bool focused); | |
| 310 | |
| 308 #if defined(OS_MACOSX) | 311 #if defined(OS_MACOSX) |
| 309 // Informs the render view that the given plugin has gained or lost focus. | 312 // Informs the render view that the given plugin has gained or lost focus. |
| 310 void PluginFocusChanged(bool focused, int plugin_id); | 313 void PluginFocusChanged(bool focused, int plugin_id); |
| 311 | 314 |
| 312 // Starts plugin IME. | 315 // Starts plugin IME. |
| 313 void StartPluginIme(); | 316 void StartPluginIme(); |
| 314 | 317 |
| 315 // Helper routines for accelerated plugin support. Used by the | 318 // Helper routines for accelerated plugin support. Used by the |
| 316 // WebPluginDelegateProxy, which has a pointer to the RenderView. | 319 // WebPluginDelegateProxy, which has a pointer to the RenderView. |
| 317 gfx::PluginWindowHandle AllocateFakePluginWindowHandle(bool opaque, | 320 gfx::PluginWindowHandle AllocateFakePluginWindowHandle(bool opaque, |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 602 TransportDIB** dib, | 605 TransportDIB** dib, |
| 603 gfx::Rect* location, | 606 gfx::Rect* location, |
| 604 gfx::Rect* clip); | 607 gfx::Rect* clip); |
| 605 virtual gfx::Point GetScrollOffset(); | 608 virtual gfx::Point GetScrollOffset(); |
| 606 virtual void DidHandleKeyEvent(); | 609 virtual void DidHandleKeyEvent(); |
| 607 virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event); | 610 virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event); |
| 608 virtual void OnSetFocus(bool enable); | 611 virtual void OnSetFocus(bool enable); |
| 609 virtual void OnWasHidden(); | 612 virtual void OnWasHidden(); |
| 610 virtual void OnWasRestored(bool needs_repainting); | 613 virtual void OnWasRestored(bool needs_repainting); |
| 611 virtual bool SupportsAsynchronousSwapBuffers() OVERRIDE; | 614 virtual bool SupportsAsynchronousSwapBuffers() OVERRIDE; |
| 615 virtual void OnImeSetComposition( | |
| 616 const string16& text, | |
| 617 const std::vector<WebKit::WebCompositionUnderline>& underlines, | |
| 618 int selection_start, | |
| 619 int selection_end) OVERRIDE; | |
| 620 virtual void OnImeConfirmComposition(const string16& text) OVERRIDE; | |
| 621 virtual void GetTextInputType(WebKit::WebTextInputType* type, | |
| 622 WebKit::WebRect* caret_bounds) OVERRIDE; | |
| 612 | 623 |
| 613 private: | 624 private: |
| 614 // For unit tests. | 625 // For unit tests. |
| 615 friend class ExternalPopupMenuTest; | 626 friend class ExternalPopupMenuTest; |
| 616 friend class PepperDeviceTest; | 627 friend class PepperDeviceTest; |
| 617 friend class RenderViewTest; | 628 friend class RenderViewTest; |
| 618 | 629 |
| 619 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); | 630 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); |
| 620 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); | 631 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); |
| 621 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); | 632 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1043 // to install itself when user clicks on the info bar. | 1054 // to install itself when user clicks on the info bar. |
| 1044 base::WeakPtr<webkit::npapi::WebPluginDelegate> first_default_plugin_; | 1055 base::WeakPtr<webkit::npapi::WebPluginDelegate> first_default_plugin_; |
| 1045 | 1056 |
| 1046 PepperPluginDelegateImpl pepper_delegate_; | 1057 PepperPluginDelegateImpl pepper_delegate_; |
| 1047 | 1058 |
| 1048 // All the currently active plugin delegates for this RenderView; kept so that | 1059 // All the currently active plugin delegates for this RenderView; kept so that |
| 1049 // we can enumerate them to send updates about things like window location | 1060 // we can enumerate them to send updates about things like window location |
| 1050 // or tab focus and visibily. These are non-owning references. | 1061 // or tab focus and visibily. These are non-owning references. |
| 1051 std::set<WebPluginDelegateProxy*> plugin_delegates_; | 1062 std::set<WebPluginDelegateProxy*> plugin_delegates_; |
| 1052 | 1063 |
| 1064 // Whether or not the focus is on a PPAPI plugin | |
| 1065 bool is_ppapi_plugin_focused_; | |
|
brettw
2011/05/26 02:57:26
Can this state be tracked on the PepperPluginDeleg
kinaba
2011/05/30 03:07:11
Done.
(The variable is moved to PepperPluginDelega
| |
| 1066 | |
| 1053 // Helper objects ------------------------------------------------------------ | 1067 // Helper objects ------------------------------------------------------------ |
| 1054 | 1068 |
| 1055 ScopedRunnableMethodFactory<RenderView> accessibility_method_factory_; | 1069 ScopedRunnableMethodFactory<RenderView> accessibility_method_factory_; |
| 1056 | 1070 |
| 1057 RendererWebCookieJarImpl cookie_jar_; | 1071 RendererWebCookieJarImpl cookie_jar_; |
| 1058 | 1072 |
| 1059 // The next group of objects all implement RenderViewObserver, so are deleted | 1073 // The next group of objects all implement RenderViewObserver, so are deleted |
| 1060 // along with the RenderView automatically. This is why we just store weak | 1074 // along with the RenderView automatically. This is why we just store weak |
| 1061 // references. | 1075 // references. |
| 1062 | 1076 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1149 // bunch of stuff, you should probably create a helper class and put your | 1163 // bunch of stuff, you should probably create a helper class and put your |
| 1150 // data and methods on that to avoid bloating RenderView more. You can use | 1164 // data and methods on that to avoid bloating RenderView more. You can use |
| 1151 // the Observer interface to filter IPC messages and receive frame change | 1165 // the Observer interface to filter IPC messages and receive frame change |
| 1152 // notifications. | 1166 // notifications. |
| 1153 // --------------------------------------------------------------------------- | 1167 // --------------------------------------------------------------------------- |
| 1154 | 1168 |
| 1155 DISALLOW_COPY_AND_ASSIGN(RenderView); | 1169 DISALLOW_COPY_AND_ASSIGN(RenderView); |
| 1156 }; | 1170 }; |
| 1157 | 1171 |
| 1158 #endif // CONTENT_RENDERER_RENDER_VIEW_H_ | 1172 #endif // CONTENT_RENDERER_RENDER_VIEW_H_ |
| OLD | NEW |