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 COMPONENTS_NACL_BROWSER_NACL_BROWSER_DELEGATE_H_ | 5 #ifndef COMPONENTS_NACL_BROWSER_NACL_BROWSER_DELEGATE_H_ |
6 #define COMPONENTS_NACL_BROWSER_NACL_BROWSER_DELEGATE_H_ | 6 #define COMPONENTS_NACL_BROWSER_NACL_BROWSER_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 11 #include "content/public/browser/browser_ppapi_host.h" |
11 | 12 |
12 class GURL; | 13 class GURL; |
13 | 14 |
14 namespace base { | 15 namespace base { |
15 class FilePath; | 16 class FilePath; |
16 } | 17 } |
17 | 18 |
18 namespace ppapi { | 19 namespace ppapi { |
19 namespace host { | 20 namespace host { |
20 class HostFactory; | 21 class HostFactory; |
21 } | 22 } |
22 } | 23 } |
23 | 24 |
24 namespace content { | |
25 class BrowserPpapiHost; | |
26 } | |
27 | |
28 // Encapsulates the dependencies of NaCl code on chrome/, to avoid a direct | 25 // Encapsulates the dependencies of NaCl code on chrome/, to avoid a direct |
29 // dependency on chrome/. | 26 // dependency on chrome/. |
30 class NaClBrowserDelegate { | 27 class NaClBrowserDelegate { |
31 public: | 28 public: |
32 virtual ~NaClBrowserDelegate() {} | 29 virtual ~NaClBrowserDelegate() {} |
33 | 30 |
34 // Show an infobar to the user. | 31 // Show an infobar to the user. |
35 virtual void ShowNaClInfobar(int render_process_id, int render_view_id, | 32 virtual void ShowNaClInfobar(int render_process_id, int render_view_id, |
36 int error_id) = 0; | 33 int error_id) = 0; |
37 // Returns whether dialogs are allowed. This is used to decide if to add the | 34 // Returns whether dialogs are allowed. This is used to decide if to add the |
(...skipping 28 matching lines...) Expand all Loading... |
66 // otherwise non blocking API will be used (which only handles a subset of the | 63 // otherwise non blocking API will be used (which only handles a subset of the |
67 // urls checking only the url scheme against kExtensionScheme). | 64 // urls checking only the url scheme against kExtensionScheme). |
68 virtual bool MapUrlToLocalFilePath(const GURL& url, | 65 virtual bool MapUrlToLocalFilePath(const GURL& url, |
69 bool use_blocking_api, | 66 bool use_blocking_api, |
70 base::FilePath* file_path) = 0; | 67 base::FilePath* file_path) = 0; |
71 // Set match patterns which will be checked before enabling debug stub. | 68 // Set match patterns which will be checked before enabling debug stub. |
72 virtual void SetDebugPatterns(std::string debug_patterns) = 0; | 69 virtual void SetDebugPatterns(std::string debug_patterns) = 0; |
73 | 70 |
74 // Returns whether NaCl application with this manifest URL should be debugged. | 71 // Returns whether NaCl application with this manifest URL should be debugged. |
75 virtual bool URLMatchesDebugPatterns(const GURL& manifest_url) = 0; | 72 virtual bool URLMatchesDebugPatterns(const GURL& manifest_url) = 0; |
| 73 |
| 74 // Returns a callback that handles NaCl idle state transitions. |
| 75 virtual content::BrowserPpapiHost::OnKeepaliveCallback |
| 76 GetOnKeepaliveCallback() = 0; |
76 }; | 77 }; |
77 | 78 |
78 #endif // COMPONENTS_NACL_BROWSER_NACL_BROWSER_DELEGATE_H_ | 79 #endif // COMPONENTS_NACL_BROWSER_NACL_BROWSER_DELEGATE_H_ |
OLD | NEW |