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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // unless there is a good reason otherwise. | 219 // unless there is a good reason otherwise. |
220 virtual bool ShouldTryToUseExistingProcessHost( | 220 virtual bool ShouldTryToUseExistingProcessHost( |
221 BrowserContext* browser_context, const GURL& url); | 221 BrowserContext* browser_context, const GURL& url); |
222 | 222 |
223 // Called when a site instance is first associated with a process. | 223 // Called when a site instance is first associated with a process. |
224 virtual void SiteInstanceGotProcess(SiteInstance* site_instance) {} | 224 virtual void SiteInstanceGotProcess(SiteInstance* site_instance) {} |
225 | 225 |
226 // Called from a site instance's destructor. | 226 // Called from a site instance's destructor. |
227 virtual void SiteInstanceDeleting(SiteInstance* site_instance) {} | 227 virtual void SiteInstanceDeleting(SiteInstance* site_instance) {} |
228 | 228 |
229 // Called when a worker process is created. | |
230 virtual void WorkerProcessCreated(SiteInstance* site_instance, | |
231 int worker_process_id) {} | |
232 | |
233 // Called when a worker process is terminated. | |
234 virtual void WorkerProcessTerminated(SiteInstance* site_instance, | |
235 int worker_process_id) {} | |
236 | |
237 // Returns true if for the navigation from |current_url| to |new_url| | 229 // Returns true if for the navigation from |current_url| to |new_url| |
238 // in |site_instance|, a new SiteInstance and BrowsingInstance should be | 230 // in |site_instance|, a new SiteInstance and BrowsingInstance should be |
239 // created (even if we are in a process model that doesn't usually swap.) | 231 // created (even if we are in a process model that doesn't usually swap.) |
240 // This forces a process swap and severs script connections with existing | 232 // This forces a process swap and severs script connections with existing |
241 // tabs. | 233 // tabs. |
242 virtual bool ShouldSwapBrowsingInstancesForNavigation( | 234 virtual bool ShouldSwapBrowsingInstancesForNavigation( |
243 SiteInstance* site_instance, | 235 SiteInstance* site_instance, |
244 const GURL& current_url, | 236 const GURL& current_url, |
245 const GURL& new_url); | 237 const GURL& new_url); |
246 | 238 |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 const Referrer& referrer, | 484 const Referrer& referrer, |
493 WindowOpenDisposition disposition, | 485 WindowOpenDisposition disposition, |
494 const blink::WebWindowFeatures& features, | 486 const blink::WebWindowFeatures& features, |
495 bool user_gesture, | 487 bool user_gesture, |
496 bool opener_suppressed, | 488 bool opener_suppressed, |
497 ResourceContext* context, | 489 ResourceContext* context, |
498 int render_process_id, | 490 int render_process_id, |
499 int opener_id, | 491 int opener_id, |
500 bool* no_javascript_access); | 492 bool* no_javascript_access); |
501 | 493 |
502 // Returns a title string to use in the task manager for a process host with | |
503 // the given URL, or the empty string to fall back to the default logic. | |
504 // This is called on the IO thread. | |
505 virtual std::string GetWorkerProcessTitle(const GURL& url, | |
506 ResourceContext* context); | |
507 | |
508 // Notifies the embedder that the ResourceDispatcherHost has been created. | 494 // Notifies the embedder that the ResourceDispatcherHost has been created. |
509 // This is when it can optionally add a delegate. | 495 // This is when it can optionally add a delegate. |
510 virtual void ResourceDispatcherHostCreated() {} | 496 virtual void ResourceDispatcherHostCreated() {} |
511 | 497 |
512 // Allows the embedder to return a delegate for the SpeechRecognitionManager. | 498 // Allows the embedder to return a delegate for the SpeechRecognitionManager. |
513 // The delegate will be owned by the manager. It's valid to return NULL. | 499 // The delegate will be owned by the manager. It's valid to return NULL. |
514 virtual SpeechRecognitionManagerDelegate* | 500 virtual SpeechRecognitionManagerDelegate* |
515 GetSpeechRecognitionManagerDelegate(); | 501 GetSpeechRecognitionManagerDelegate(); |
516 | 502 |
517 // Getters for common objects. | 503 // Getters for common objects. |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 // Allows an embedder to provide its own ExternalVideoSurfaceContainer | 640 // Allows an embedder to provide its own ExternalVideoSurfaceContainer |
655 // implementation. Return NULL to disable external surface video. | 641 // implementation. Return NULL to disable external surface video. |
656 virtual ExternalVideoSurfaceContainer* | 642 virtual ExternalVideoSurfaceContainer* |
657 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); | 643 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); |
658 #endif | 644 #endif |
659 }; | 645 }; |
660 | 646 |
661 } // namespace content | 647 } // namespace content |
662 | 648 |
663 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 649 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |