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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 // Allows programmatic opening of a new tab/window without going through | 609 // Allows programmatic opening of a new tab/window without going through |
610 // another WebContents. For example, from a Worker. |callback| will be | 610 // another WebContents. For example, from a Worker. |callback| will be |
611 // invoked with the appropriate WebContents* when available. | 611 // invoked with the appropriate WebContents* when available. |
612 virtual void OpenURL(BrowserContext* browser_context, | 612 virtual void OpenURL(BrowserContext* browser_context, |
613 const OpenURLParams& params, | 613 const OpenURLParams& params, |
614 const base::Callback<void(WebContents*)>& callback); | 614 const base::Callback<void(WebContents*)>& callback); |
615 | 615 |
616 // Allows the embedder to record |metric| for a specific |url|. | 616 // Allows the embedder to record |metric| for a specific |url|. |
617 virtual void RecordURLMetric(const std::string& metric, const GURL& url) {} | 617 virtual void RecordURLMetric(const std::string& metric, const GURL& url) {} |
618 | 618 |
619 #if defined(OS_POSIX) && !defined(OS_MACOSX) | |
620 // Populates |mappings| with all files that need to be mapped before launching | 619 // Populates |mappings| with all files that need to be mapped before launching |
621 // a child process. | 620 // a child process. |
| 621 #if defined(OS_ANDROID) |
622 virtual void GetAdditionalMappedFilesForChildProcess( | 622 virtual void GetAdditionalMappedFilesForChildProcess( |
623 const base::CommandLine& command_line, | 623 const base::CommandLine& command_line, |
624 int child_process_id, | 624 int child_process_id, |
625 FileDescriptorInfo* mappings) {} | 625 content::FileDescriptorInfo* mappings, |
626 #endif | 626 std::map<int, base::MemoryMappedFile::Region>* regions) {} |
| 627 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
| 628 virtual void GetAdditionalMappedFilesForChildProcess( |
| 629 const base::CommandLine& command_line, |
| 630 int child_process_id, |
| 631 content::FileDescriptorInfo* mappings) {} |
| 632 #endif // defined(OS_ANDROID) |
627 | 633 |
628 #if defined(OS_WIN) | 634 #if defined(OS_WIN) |
629 // Returns the name of the dll that contains cursors and other resources. | 635 // Returns the name of the dll that contains cursors and other resources. |
630 virtual const wchar_t* GetResourceDllName(); | 636 virtual const wchar_t* GetResourceDllName(); |
631 | 637 |
632 // This is called on the PROCESS_LAUNCHER thread before the renderer process | 638 // This is called on the PROCESS_LAUNCHER thread before the renderer process |
633 // is launched. It gives the embedder a chance to add loosen the sandbox | 639 // is launched. It gives the embedder a chance to add loosen the sandbox |
634 // policy. | 640 // policy. |
635 virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, | 641 virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, |
636 bool* success) {} | 642 bool* success) {} |
637 #endif | 643 #endif |
638 | 644 |
639 #if defined(VIDEO_HOLE) | 645 #if defined(VIDEO_HOLE) |
640 // Allows an embedder to provide its own ExternalVideoSurfaceContainer | 646 // Allows an embedder to provide its own ExternalVideoSurfaceContainer |
641 // implementation. Return nullptr to disable external surface video. | 647 // implementation. Return nullptr to disable external surface video. |
642 virtual ExternalVideoSurfaceContainer* | 648 virtual ExternalVideoSurfaceContainer* |
643 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); | 649 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); |
644 #endif | 650 #endif |
645 }; | 651 }; |
646 | 652 |
647 } // namespace content | 653 } // namespace content |
648 | 654 |
649 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 655 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |