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_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
7 | 7 |
| 8 #include <map> |
8 #include <string> | 9 #include <string> |
9 #include <vector> | 10 #include <vector> |
10 | 11 |
11 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
12 #include "base/logging.h" | 13 #include "base/logging.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
14 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
15 #include "base/process_util.h" | 16 #include "base/process_util.h" |
16 #include "content/browser/renderer_host/render_widget_host_impl.h" | 17 #include "content/browser/renderer_host/render_widget_host_impl.h" |
17 #include "content/browser/site_instance_impl.h" | 18 #include "content/browser/site_instance_impl.h" |
(...skipping 17 matching lines...) Expand all Loading... |
35 struct ViewHostMsg_CreateWindow_Params; | 36 struct ViewHostMsg_CreateWindow_Params; |
36 struct ViewHostMsg_DidFailProvisionalLoadWithError_Params; | 37 struct ViewHostMsg_DidFailProvisionalLoadWithError_Params; |
37 struct ViewHostMsg_OpenURL_Params; | 38 struct ViewHostMsg_OpenURL_Params; |
38 struct ViewHostMsg_ShowPopup_Params; | 39 struct ViewHostMsg_ShowPopup_Params; |
39 struct ViewMsg_Navigate_Params; | 40 struct ViewMsg_Navigate_Params; |
40 struct ViewMsg_PostMessage_Params; | 41 struct ViewMsg_PostMessage_Params; |
41 struct ViewMsg_StopFinding_Params; | 42 struct ViewMsg_StopFinding_Params; |
42 | 43 |
43 namespace base { | 44 namespace base { |
44 class ListValue; | 45 class ListValue; |
| 46 class Value; |
45 } | 47 } |
46 | 48 |
47 namespace ui { | 49 namespace ui { |
48 class Range; | 50 class Range; |
49 struct SelectedFileInfo; | 51 struct SelectedFileInfo; |
50 } | 52 } |
51 | 53 |
52 namespace content { | 54 namespace content { |
53 | 55 |
54 class ChildProcessSecurityPolicyImpl; | 56 class ChildProcessSecurityPolicyImpl; |
(...skipping 17 matching lines...) Expand all Loading... |
72 class ExecuteNotificationObserver : public NotificationObserver { | 74 class ExecuteNotificationObserver : public NotificationObserver { |
73 public: | 75 public: |
74 explicit ExecuteNotificationObserver(int id); | 76 explicit ExecuteNotificationObserver(int id); |
75 virtual ~ExecuteNotificationObserver(); | 77 virtual ~ExecuteNotificationObserver(); |
76 virtual void Observe(int type, | 78 virtual void Observe(int type, |
77 const NotificationSource& source, | 79 const NotificationSource& source, |
78 const NotificationDetails& details) OVERRIDE; | 80 const NotificationDetails& details) OVERRIDE; |
79 | 81 |
80 int id() const { return id_; } | 82 int id() const { return id_; } |
81 | 83 |
82 Value* value() const { return value_.get(); } | 84 base::Value* value() const { return value_.get(); } |
83 | 85 |
84 private: | 86 private: |
85 int id_; | 87 int id_; |
86 scoped_ptr<Value> value_; | 88 scoped_ptr<base::Value> value_; |
87 | 89 |
88 DISALLOW_COPY_AND_ASSIGN(ExecuteNotificationObserver); | 90 DISALLOW_COPY_AND_ASSIGN(ExecuteNotificationObserver); |
89 }; | 91 }; |
90 | 92 |
91 #if defined(COMPILER_MSVC) | 93 #if defined(COMPILER_MSVC) |
92 // RenderViewHostImpl is the bottom of a diamond-shaped hierarchy, | 94 // RenderViewHostImpl is the bottom of a diamond-shaped hierarchy, |
93 // with RenderWidgetHost at the root. VS warns when methods from the | 95 // with RenderWidgetHost at the root. VS warns when methods from the |
94 // root are overridden in only one of the base classes and not both | 96 // root are overridden in only one of the base classes and not both |
95 // (in this case, RenderWidgetHostImpl provides implementations of | 97 // (in this case, RenderWidgetHostImpl provides implementations of |
96 // many of the methods). This is a silly warning when dealing with | 98 // many of the methods). This is a silly warning when dealing with |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 virtual void ExecuteCustomContextMenuCommand( | 188 virtual void ExecuteCustomContextMenuCommand( |
187 int action, const CustomContextMenuContext& context) OVERRIDE; | 189 int action, const CustomContextMenuContext& context) OVERRIDE; |
188 virtual void ExecuteMediaPlayerActionAtLocation( | 190 virtual void ExecuteMediaPlayerActionAtLocation( |
189 const gfx::Point& location, | 191 const gfx::Point& location, |
190 const WebKit::WebMediaPlayerAction& action) OVERRIDE; | 192 const WebKit::WebMediaPlayerAction& action) OVERRIDE; |
191 virtual void ExecuteJavascriptInWebFrame(const string16& frame_xpath, | 193 virtual void ExecuteJavascriptInWebFrame(const string16& frame_xpath, |
192 const string16& jscript) OVERRIDE; | 194 const string16& jscript) OVERRIDE; |
193 virtual int ExecuteJavascriptInWebFrameNotifyResult( | 195 virtual int ExecuteJavascriptInWebFrameNotifyResult( |
194 const string16& frame_xpath, | 196 const string16& frame_xpath, |
195 const string16& jscript) OVERRIDE; | 197 const string16& jscript) OVERRIDE; |
196 virtual Value* ExecuteJavascriptAndGetValue(const string16& frame_xpath, | 198 virtual void ExecuteJavascriptInWebFrameCallbackResult( |
197 const string16& jscript) OVERRIDE; | 199 const string16& frame_xpath, |
| 200 const string16& jscript, |
| 201 const JavascriptResultCallback& callback) OVERRIDE; |
| 202 virtual base::Value* ExecuteJavascriptAndGetValue( |
| 203 const string16& frame_xpath, |
| 204 const string16& jscript) OVERRIDE; |
198 virtual void ExecutePluginActionAtLocation( | 205 virtual void ExecutePluginActionAtLocation( |
199 const gfx::Point& location, | 206 const gfx::Point& location, |
200 const WebKit::WebPluginAction& action) OVERRIDE; | 207 const WebKit::WebPluginAction& action) OVERRIDE; |
201 virtual void ExitFullscreen() OVERRIDE; | 208 virtual void ExitFullscreen() OVERRIDE; |
202 virtual void Find(int request_id, const string16& search_text, | 209 virtual void Find(int request_id, const string16& search_text, |
203 const WebKit::WebFindOptions& options) OVERRIDE; | 210 const WebKit::WebFindOptions& options) OVERRIDE; |
204 virtual void StopFinding(StopFindAction action) OVERRIDE; | 211 virtual void StopFinding(StopFindAction action) OVERRIDE; |
205 virtual void FirePageBeforeUnload(bool for_cross_site_transition) OVERRIDE; | 212 virtual void FirePageBeforeUnload(bool for_cross_site_transition) OVERRIDE; |
206 virtual void FilesSelectedInChooser( | 213 virtual void FilesSelectedInChooser( |
207 const std::vector<ui::SelectedFileInfo>& files, | 214 const std::vector<ui::SelectedFileInfo>& files, |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 bool has_timed_out_on_unload_; | 657 bool has_timed_out_on_unload_; |
651 | 658 |
652 // Valid only when is_waiting_for_beforeunload_ack_ or | 659 // Valid only when is_waiting_for_beforeunload_ack_ or |
653 // is_waiting_for_unload_ack_ is true. This tells us if the unload request | 660 // is_waiting_for_unload_ack_ is true. This tells us if the unload request |
654 // is for closing the entire tab ( = false), or only this RenderViewHost in | 661 // is for closing the entire tab ( = false), or only this RenderViewHost in |
655 // the case of a cross-site transition ( = true). | 662 // the case of a cross-site transition ( = true). |
656 bool unload_ack_is_for_cross_site_transition_; | 663 bool unload_ack_is_for_cross_site_transition_; |
657 | 664 |
658 bool are_javascript_messages_suppressed_; | 665 bool are_javascript_messages_suppressed_; |
659 | 666 |
| 667 // The mapping of pending javascript calls created by |
| 668 // ExecuteJavascriptInWebFrameCallbackResult and their corresponding |
| 669 // callbacks. |
| 670 std::map<int, JavascriptResultCallback> javascript_callbacks_; |
| 671 |
660 // True if the render view can be shut down suddenly. | 672 // True if the render view can be shut down suddenly. |
661 bool sudden_termination_allowed_; | 673 bool sudden_termination_allowed_; |
662 | 674 |
663 // The session storage namespace to be used by the associated render view. | 675 // The session storage namespace to be used by the associated render view. |
664 scoped_refptr<SessionStorageNamespaceImpl> session_storage_namespace_; | 676 scoped_refptr<SessionStorageNamespaceImpl> session_storage_namespace_; |
665 | 677 |
666 // Whether the accessibility tree should be saved, for unit testing. | 678 // Whether the accessibility tree should be saved, for unit testing. |
667 bool save_accessibility_tree_for_testing_; | 679 bool save_accessibility_tree_for_testing_; |
668 | 680 |
669 // A JSON serialized representation of the frame tree for the current document | 681 // A JSON serialized representation of the frame tree for the current document |
(...skipping 27 matching lines...) Expand all Loading... |
697 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 709 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
698 }; | 710 }; |
699 | 711 |
700 #if defined(COMPILER_MSVC) | 712 #if defined(COMPILER_MSVC) |
701 #pragma warning(pop) | 713 #pragma warning(pop) |
702 #endif | 714 #endif |
703 | 715 |
704 } // namespace content | 716 } // namespace content |
705 | 717 |
706 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 718 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
OLD | NEW |