Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Side by Side Diff: components/app_modal/javascript_dialog_extensions_client.h

Issue 688853005: Consolidate javascript_dialog_manager.h and javascript_dialog_manager_impl.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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_APP_MODAL_JAVASCRIPT_DIALOG_EXTENSIONS_CLIENT_H_ 5 #ifndef COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_EXTENSIONS_CLIENT_H_
6 #define COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_EXTENSIONS_CLIENT_H_ 6 #define COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_EXTENSIONS_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 class GURL; 10 class GURL;
11 11
12 namespace content { 12 namespace content {
13 class WebContents; 13 class WebContents;
14 } 14 }
15 15
16 namespace app_modal {
17
16 // A client interface to access and control extensions/apps 18 // A client interface to access and control extensions/apps
17 // that opened a JavaScript dialog. 19 // that opened a JavaScript dialog.
18 class JavaScriptDialogExtensionsClient { 20 class JavaScriptDialogExtensionsClient {
19 public: 21 public:
20 virtual ~JavaScriptDialogExtensionsClient() {} 22 virtual ~JavaScriptDialogExtensionsClient() {}
21 23
22 // Called when the extension associated with |web_contents| opened 24 // Called when the extension associated with |web_contents| opened
23 // a dialog. 25 // a dialog.
24 virtual void OnDialogOpened(content::WebContents* web_contents) = 0; 26 virtual void OnDialogOpened(content::WebContents* web_contents) = 0;
25 27
26 // Called when a dialog created by the extension associated with 28 // Called when a dialog created by the extension associated with
27 // |web_contents| is closed. 29 // |web_contents| is closed.
28 virtual void OnDialogClosed(content::WebContents* web_contents) = 0; 30 virtual void OnDialogClosed(content::WebContents* web_contents) = 0;
29 31
30 // Sets the name of the extensions associated with the 32 // Sets the name of the extensions associated with the
31 // |web_contents| in the |name_out| if there is one, returning true; 33 // |web_contents| in the |name_out| if there is one, returning true;
32 // returns false otherwise. 34 // returns false otherwise.
33 virtual bool GetExtensionName(content::WebContents* web_contents, 35 virtual bool GetExtensionName(content::WebContents* web_contents,
34 const GURL& origin_url, 36 const GURL& origin_url,
35 std::string* name_out) = 0; 37 std::string* name_out) = 0;
36 }; 38 };
37 39
40 } // namespace app_modal
41
38 #endif // COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_EXTENSIONS_CLIENT_H_ 42 #endif // COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_EXTENSIONS_CLIENT_H_
OLDNEW
« no previous file with comments | « components/app_modal/javascript_app_modal_dialog.cc ('k') | components/app_modal/javascript_dialog_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698