| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
| 17 #include "content/common/mojo/service_registry_impl.h" | 17 #include "content/common/mojo/service_registry_impl.h" |
| 18 #include "content/public/browser/render_frame_host.h" | 18 #include "content/public/browser/render_frame_host.h" |
| 19 #include "content/public/common/javascript_message_type.h" | 19 #include "content/public/common/javascript_message_type.h" |
| 20 #include "content/public/common/page_transition_types.h" | 20 #include "content/public/common/page_transition_types.h" |
| 21 #include "third_party/WebKit/public/platform/WebNotificationPermission.h" |
| 21 #include "third_party/WebKit/public/web/WebTextDirection.h" | 22 #include "third_party/WebKit/public/web/WebTextDirection.h" |
| 22 | 23 |
| 23 class GURL; | 24 class GURL; |
| 24 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; | 25 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; |
| 25 struct FrameHostMsg_OpenURL_Params; | 26 struct FrameHostMsg_OpenURL_Params; |
| 26 struct FrameMsg_Navigate_Params; | 27 struct FrameMsg_Navigate_Params; |
| 27 | 28 |
| 28 namespace base { | 29 namespace base { |
| 29 class FilePath; | 30 class FilePath; |
| 30 class ListValue; | 31 class ListValue; |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 void OnJavaScriptExecuteResponse(int id, const base::ListValue& result); | 225 void OnJavaScriptExecuteResponse(int id, const base::ListValue& result); |
| 225 void OnRunJavaScriptMessage(const base::string16& message, | 226 void OnRunJavaScriptMessage(const base::string16& message, |
| 226 const base::string16& default_prompt, | 227 const base::string16& default_prompt, |
| 227 const GURL& frame_url, | 228 const GURL& frame_url, |
| 228 JavaScriptMessageType type, | 229 JavaScriptMessageType type, |
| 229 IPC::Message* reply_msg); | 230 IPC::Message* reply_msg); |
| 230 void OnRunBeforeUnloadConfirm(const GURL& frame_url, | 231 void OnRunBeforeUnloadConfirm(const GURL& frame_url, |
| 231 const base::string16& message, | 232 const base::string16& message, |
| 232 bool is_reload, | 233 bool is_reload, |
| 233 IPC::Message* reply_msg); | 234 IPC::Message* reply_msg); |
| 235 void OnRequestPlatformNotificationPermission(const GURL& origin, |
| 236 int request_id); |
| 234 void OnRequestDesktopNotificationPermission(const GURL& origin, | 237 void OnRequestDesktopNotificationPermission(const GURL& origin, |
| 235 int callback_id); | 238 int callback_id); |
| 236 void OnShowDesktopNotification( | 239 void OnShowDesktopNotification( |
| 237 int notification_id, | 240 int notification_id, |
| 238 const ShowDesktopNotificationHostMsgParams& params); | 241 const ShowDesktopNotificationHostMsgParams& params); |
| 239 void OnCancelDesktopNotification(int notification_id); | 242 void OnCancelDesktopNotification(int notification_id); |
| 240 void OnTextSurroundingSelectionResponse(const base::string16& content, | 243 void OnTextSurroundingSelectionResponse(const base::string16& content, |
| 241 size_t start_offset, | 244 size_t start_offset, |
| 242 size_t end_offset); | 245 size_t end_offset); |
| 243 void OnDidAccessInitialDocument(); | 246 void OnDidAccessInitialDocument(); |
| 244 void OnDidDisownOpener(); | 247 void OnDidDisownOpener(); |
| 245 void OnUpdateTitle(int32 page_id, | 248 void OnUpdateTitle(int32 page_id, |
| 246 const base::string16& title, | 249 const base::string16& title, |
| 247 blink::WebTextDirection title_direction); | 250 blink::WebTextDirection title_direction); |
| 248 void OnUpdateEncoding(const std::string& encoding); | 251 void OnUpdateEncoding(const std::string& encoding); |
| 249 | 252 |
| 250 // Returns whether the given URL is allowed to commit in the current process. | 253 // Returns whether the given URL is allowed to commit in the current process. |
| 251 // This is a more conservative check than RenderProcessHost::FilterURL, since | 254 // This is a more conservative check than RenderProcessHost::FilterURL, since |
| 252 // it will be used to kill processes that commit unauthorized URLs. | 255 // it will be used to kill processes that commit unauthorized URLs. |
| 253 bool CanCommitURL(const GURL& url); | 256 bool CanCommitURL(const GURL& url); |
| 254 | 257 |
| 258 void PlatformNotificationPermissionRequestDone(const GURL& origin, |
| 259 int request_id); |
| 255 void DesktopNotificationPermissionRequestDone(int callback_context); | 260 void DesktopNotificationPermissionRequestDone(int callback_context); |
| 256 | 261 |
| 257 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a | 262 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a |
| 258 // refcount that calls Shutdown when it reaches zero. This allows each | 263 // refcount that calls Shutdown when it reaches zero. This allows each |
| 259 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring | 264 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring |
| 260 // we have a RenderViewHost for each RenderFrameHost. | 265 // we have a RenderViewHost for each RenderFrameHost. |
| 261 // TODO(creis): RenderViewHost will eventually go away and be replaced with | 266 // TODO(creis): RenderViewHost will eventually go away and be replaced with |
| 262 // some form of page context. | 267 // some form of page context. |
| 263 RenderViewHostImpl* render_view_host_; | 268 RenderViewHostImpl* render_view_host_; |
| 264 | 269 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 ServiceRegistryImpl service_registry_; | 311 ServiceRegistryImpl service_registry_; |
| 307 | 312 |
| 308 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 313 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
| 309 | 314 |
| 310 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 315 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| 311 }; | 316 }; |
| 312 | 317 |
| 313 } // namespace content | 318 } // namespace content |
| 314 | 319 |
| 315 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 320 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| OLD | NEW |