OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_APP_MODAL_DIALOGS_JAVASCRIPT_DIALOG_EXTENSIONS_CLIENT_H_ | |
6 #define COMPONENTS_APP_MODAL_DIALOGS_JAVASCRIPT_DIALOG_EXTENSIONS_CLIENT_H_ | |
7 | |
8 #include <string> | |
9 | |
10 class GURL; | |
11 | |
12 namespace content { | |
13 class WebContents; | |
14 } | |
15 | |
16 // A client interface to access and control extensions/apps | |
17 // that opened a JavaScript dialog. | |
18 class JavaScriptDialogExtensionsClient { | |
19 public: | |
20 virtual ~JavaScriptDialogExtensionsClient() {} | |
21 | |
22 // Called when the extension associated with |web_contents| opened | |
23 // a dialog. The embedder should increment its keep alive count so | |
24 // that its lazy background page can stay alive. | |
25 virtual void IncrementLazyKeepaliveCount( | |
Yoyo Zhou
2014/11/06 01:05:03
I think I'd prefer if these were called, e.g. OnDi
oshima
2014/11/06 01:47:44
Done.
| |
26 content::WebContents* web_contents) = 0; | |
27 | |
28 // Called when a dialog created by the extension associated with | |
29 // |web_contents| is closed. The embedder should decrement | |
30 // its keep alive count so that the extension can shutdown | |
31 // its lazy background page. | |
32 virtual void DecrementLazyKeepaliveCount( | |
33 content::WebContents* web_contents) = 0; | |
34 | |
35 // Sets the name of the extensions associated with the |web_contents| | |
Yoyo Zhou
2014/11/06 01:05:02
The grammar here is a little unusual. How about:
S
oshima
2014/11/06 01:47:43
Done.
| |
36 // in the |name_out|, and returns true. If there is no extension associated | |
37 // with the |web_contents|, returns false. | |
38 virtual bool GetExtensionName(content::WebContents* web_contents, | |
39 const GURL& origin_url, | |
40 std::string* name_out) = 0; | |
41 }; | |
42 | |
43 #endif // COMPONENTS_APP_MODAL_DIALOGS_JAVASCRIPT_DIALOG_EXTENSIONS_CLIENT_H_ | |
OLD | NEW |