Chromium Code Reviews| 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_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 #include "content/public/common/media_stream_request.h" | 23 #include "content/public/common/media_stream_request.h" |
| 24 #include "content/public/common/resource_type.h" | 24 #include "content/public/common/resource_type.h" |
| 25 #include "content/public/common/service_info.h" | 25 #include "content/public/common/service_info.h" |
| 26 #include "content/public/common/socket_permission_request.h" | 26 #include "content/public/common/socket_permission_request.h" |
| 27 #include "content/public/common/window_container_type.h" | 27 #include "content/public/common/window_container_type.h" |
| 28 #include "media/audio/audio_manager.h" | 28 #include "media/audio/audio_manager.h" |
| 29 #include "net/base/mime_util.h" | 29 #include "net/base/mime_util.h" |
| 30 #include "net/cookies/canonical_cookie.h" | 30 #include "net/cookies/canonical_cookie.h" |
| 31 #include "storage/browser/fileapi/file_system_context.h" | 31 #include "storage/browser/fileapi/file_system_context.h" |
| 32 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | 32 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" |
| 33 #include "ui/base/page_transition_types.h" | |
| 33 #include "ui/base/window_open_disposition.h" | 34 #include "ui/base/window_open_disposition.h" |
| 34 | 35 |
| 35 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 36 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 36 #include "base/posix/global_descriptors.h" | 37 #include "base/posix/global_descriptors.h" |
| 37 #endif | 38 #endif |
| 38 | 39 |
| 39 #if defined(OS_POSIX) | 40 #if defined(OS_POSIX) |
| 40 #include "content/public/browser/file_descriptor_info.h" | 41 #include "content/public/browser/file_descriptor_info.h" |
| 41 #endif | 42 #endif |
| 42 | 43 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 227 // more conservative check than IsSuitableHost, since it is used after a | 228 // more conservative check than IsSuitableHost, since it is used after a |
| 228 // navigation has committed to ensure that the process did not exceed its | 229 // navigation has committed to ensure that the process did not exceed its |
| 229 // authority. | 230 // authority. |
| 230 // This is called on the UI thread. | 231 // This is called on the UI thread. |
| 231 virtual bool CanCommitURL(RenderProcessHost* process_host, const GURL& url); | 232 virtual bool CanCommitURL(RenderProcessHost* process_host, const GURL& url); |
| 232 | 233 |
| 233 // Returns whether a URL should be allowed to open from a specific context. | 234 // Returns whether a URL should be allowed to open from a specific context. |
| 234 // This also applies in cases where the new URL will open in another process. | 235 // This also applies in cases where the new URL will open in another process. |
| 235 virtual bool ShouldAllowOpenURL(SiteInstance* site_instance, const GURL& url); | 236 virtual bool ShouldAllowOpenURL(SiteInstance* site_instance, const GURL& url); |
| 236 | 237 |
| 237 // Allows the embedder to override OpenURLParams. | 238 // Allows the embedder to override parameters when navigating. Called for both |
| 238 virtual void OverrideOpenURLParams(SiteInstance* site_instance, | 239 // opening new urls and transfer urls. |
|
Charlie Reis
2016/11/07 21:00:03
nit: opening new URLs and when transferring URLs a
Devlin
2016/11/09 15:45:54
Done.
| |
| 239 OpenURLParams* params) {} | 240 virtual void OverrideNavigationParams(SiteInstance* site_instance, |
| 241 ui::PageTransition* transition, | |
| 242 bool* is_renderer_initiated, | |
| 243 content::Referrer* referrer) {} | |
| 240 | 244 |
| 241 // Returns whether a new view for a given |site_url| can be launched in a | 245 // Returns whether a new view for a given |site_url| can be launched in a |
| 242 // given |process_host|. | 246 // given |process_host|. |
| 243 virtual bool IsSuitableHost(RenderProcessHost* process_host, | 247 virtual bool IsSuitableHost(RenderProcessHost* process_host, |
| 244 const GURL& site_url); | 248 const GURL& site_url); |
| 245 | 249 |
| 246 // Returns whether a new view for a new site instance can be added to a | 250 // Returns whether a new view for a new site instance can be added to a |
| 247 // given |process_host|. | 251 // given |process_host|. |
| 248 virtual bool MayReuseHost(RenderProcessHost* process_host); | 252 virtual bool MayReuseHost(RenderProcessHost* process_host); |
| 249 | 253 |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 767 #endif | 771 #endif |
| 768 | 772 |
| 769 // Returns an instance of MemoryCoordinatorDelegate. | 773 // Returns an instance of MemoryCoordinatorDelegate. |
| 770 virtual std::unique_ptr<MemoryCoordinatorDelegate> | 774 virtual std::unique_ptr<MemoryCoordinatorDelegate> |
| 771 GetMemoryCoordinatorDelegate(); | 775 GetMemoryCoordinatorDelegate(); |
| 772 }; | 776 }; |
| 773 | 777 |
| 774 } // namespace content | 778 } // namespace content |
| 775 | 779 |
| 776 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 780 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |