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> |
11 #include <queue> | 11 #include <queue> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
17 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
18 #include "base/id_map.h" | 18 #include "base/id_map.h" |
19 #include "base/memory/linked_ptr.h" | 19 #include "base/memory/linked_ptr.h" |
20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
21 #include "base/observer_list.h" | 21 #include "base/observer_list.h" |
22 #include "base/timer.h" | 22 #include "base/timer.h" |
23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
24 #include "chrome/common/content_settings.h" | 24 #include "chrome/common/content_settings.h" |
| 25 #include "chrome/common/search_provider.h" |
25 #include "chrome/common/view_types.h" | 26 #include "chrome/common/view_types.h" |
26 #include "chrome/renderer/page_load_histograms.h" | 27 #include "chrome/renderer/page_load_histograms.h" |
27 #include "content/renderer/renderer_webcookiejar_impl.h" | 28 #include "content/renderer/renderer_webcookiejar_impl.h" |
28 #include "content/common/edit_command.h" | 29 #include "content/common/edit_command.h" |
29 #include "content/common/navigation_gesture.h" | 30 #include "content/common/navigation_gesture.h" |
30 #include "content/common/page_zoom.h" | 31 #include "content/common/page_zoom.h" |
31 #include "content/common/renderer_preferences.h" | 32 #include "content/common/renderer_preferences.h" |
32 #include "content/renderer/pepper_plugin_delegate_impl.h" | 33 #include "content/renderer/pepper_plugin_delegate_impl.h" |
33 #include "content/renderer/render_widget.h" | 34 #include "content/renderer/render_widget.h" |
34 #include "ipc/ipc_platform_file.h" | 35 #include "ipc/ipc_platform_file.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 class SkBitmap; | 76 class SkBitmap; |
76 class SpeechInputDispatcher; | 77 class SpeechInputDispatcher; |
77 class SpellCheckProvider; | 78 class SpellCheckProvider; |
78 class WebPluginDelegatePepper; | 79 class WebPluginDelegatePepper; |
79 class WebPluginDelegateProxy; | 80 class WebPluginDelegateProxy; |
80 class WebUIBindings; | 81 class WebUIBindings; |
81 struct ContextMenuMediaParams; | 82 struct ContextMenuMediaParams; |
82 struct ExtensionMsg_ExecuteCode_Params; | 83 struct ExtensionMsg_ExecuteCode_Params; |
83 struct PP_Flash_NetAddress; | 84 struct PP_Flash_NetAddress; |
84 struct ThumbnailScore; | 85 struct ThumbnailScore; |
85 struct ViewHostMsg_GetSearchProviderInstallState_Params; | |
86 struct ViewHostMsg_PageHasOSDD_Type; | |
87 struct ViewHostMsg_RunFileChooser_Params; | 86 struct ViewHostMsg_RunFileChooser_Params; |
88 struct ViewMsg_ClosePage_Params; | 87 struct ViewMsg_ClosePage_Params; |
89 struct ViewMsg_Navigate_Params; | 88 struct ViewMsg_Navigate_Params; |
90 struct ViewMsg_StopFinding_Params; | 89 struct ViewMsg_StopFinding_Params; |
91 struct WebApplicationInfo; | 90 struct WebApplicationInfo; |
92 struct WebDropData; | 91 struct WebDropData; |
93 | 92 |
94 namespace base { | 93 namespace base { |
95 class WaitableEvent; | 94 class WaitableEvent; |
96 } | 95 } |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 return p2p_socket_dispatcher_; | 255 return p2p_socket_dispatcher_; |
257 } | 256 } |
258 | 257 |
259 // Functions to add and remove observers for this object. | 258 // Functions to add and remove observers for this object. |
260 void AddObserver(RenderViewObserver* observer); | 259 void AddObserver(RenderViewObserver* observer); |
261 void RemoveObserver(RenderViewObserver* observer); | 260 void RemoveObserver(RenderViewObserver* observer); |
262 | 261 |
263 // Called from JavaScript window.external.AddSearchProvider() to add a | 262 // Called from JavaScript window.external.AddSearchProvider() to add a |
264 // keyword for a provider described in the given OpenSearch document. | 263 // keyword for a provider described in the given OpenSearch document. |
265 void AddSearchProvider(const std::string& url, | 264 void AddSearchProvider(const std::string& url, |
266 const ViewHostMsg_PageHasOSDD_Type& provider_type); | 265 search_provider::OSDDType provider_type); |
267 | 266 |
268 // Returns the install state for the given search provider url. | 267 // Returns the install state for the given search provider url. |
269 ViewHostMsg_GetSearchProviderInstallState_Params | 268 search_provider::InstallState GetSearchProviderInstallState( |
270 GetSearchProviderInstallState(WebKit::WebFrame* frame, | 269 WebKit::WebFrame* frame, |
271 const std::string& url); | 270 const std::string& url); |
272 | 271 |
273 // Evaluates a string of JavaScript in a particular frame. | 272 // Evaluates a string of JavaScript in a particular frame. |
274 void EvaluateScript(const string16& frame_xpath, | 273 void EvaluateScript(const string16& frame_xpath, |
275 const string16& jscript, | 274 const string16& jscript, |
276 int id, | 275 int id, |
277 bool notify_result); | 276 bool notify_result); |
278 | 277 |
279 // Adds the given file chooser request to the file_chooser_completion_ queue | 278 // Adds the given file chooser request to the file_chooser_completion_ queue |
280 // (see that var for more) and requests the chooser be displayed if there are | 279 // (see that var for more) and requests the chooser be displayed if there are |
281 // no other waiting items in the queue. | 280 // no other waiting items in the queue. |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 const std::wstring& default_value, | 764 const std::wstring& default_value, |
766 const GURL& frame_url, | 765 const GURL& frame_url, |
767 std::wstring* result); | 766 std::wstring* result); |
768 | 767 |
769 // Sends a message and runs a nested message loop. | 768 // Sends a message and runs a nested message loop. |
770 bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message); | 769 bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message); |
771 | 770 |
772 // Adds search provider from the given OpenSearch description URL as a | 771 // Adds search provider from the given OpenSearch description URL as a |
773 // keyword search. | 772 // keyword search. |
774 void AddGURLSearchProvider(const GURL& osd_url, | 773 void AddGURLSearchProvider(const GURL& osd_url, |
775 const ViewHostMsg_PageHasOSDD_Type& provider_type); | 774 search_provider::OSDDType provider_type); |
776 | 775 |
777 // Send queued accessibility notifications from the renderer to the browser. | 776 // Send queued accessibility notifications from the renderer to the browser. |
778 void SendPendingAccessibilityNotifications(); | 777 void SendPendingAccessibilityNotifications(); |
779 | 778 |
780 // IPC message handlers ------------------------------------------------------ | 779 // IPC message handlers ------------------------------------------------------ |
781 // | 780 // |
782 // The documentation for these functions should be in | 781 // The documentation for these functions should be in |
783 // render_messages_internal.h for the message that the function is handling. | 782 // render_messages_internal.h for the message that the function is handling. |
784 | 783 |
785 void OnAccessibilityDoDefaultAction(int acc_obj_id); | 784 void OnAccessibilityDoDefaultAction(int acc_obj_id); |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 // bunch of stuff, you should probably create a helper class and put your | 1413 // bunch of stuff, you should probably create a helper class and put your |
1415 // data and methods on that to avoid bloating RenderView more. You can use | 1414 // data and methods on that to avoid bloating RenderView more. You can use |
1416 // the Observer interface to filter IPC messages and receive frame change | 1415 // the Observer interface to filter IPC messages and receive frame change |
1417 // notifications. | 1416 // notifications. |
1418 // --------------------------------------------------------------------------- | 1417 // --------------------------------------------------------------------------- |
1419 | 1418 |
1420 DISALLOW_COPY_AND_ASSIGN(RenderView); | 1419 DISALLOW_COPY_AND_ASSIGN(RenderView); |
1421 }; | 1420 }; |
1422 | 1421 |
1423 #endif // CONTENT_RENDERER_RENDER_VIEW_H_ | 1422 #endif // CONTENT_RENDERER_RENDER_VIEW_H_ |
OLD | NEW |