Revert of Add Masonry to key_silk_cases. (patchset #3 id:40001 of https://codereview...
[chromium-blink-merge.git] / components / app_modal / javascript_dialog_extensions_client.h
blobf85976e99b16df944ddebbb3b837c02276611f02
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.
5 #ifndef COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_EXTENSIONS_CLIENT_H_
6 #define COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_EXTENSIONS_CLIENT_H_
8 #include <string>
10 class GURL;
12 namespace content {
13 class WebContents;
16 namespace app_modal {
18 // A client interface to access and control extensions/apps
19 // that opened a JavaScript dialog.
20 class JavaScriptDialogExtensionsClient {
21 public:
22 virtual ~JavaScriptDialogExtensionsClient() {}
24 // Called when the extension associated with |web_contents| opened
25 // a dialog.
26 virtual void OnDialogOpened(content::WebContents* web_contents) = 0;
28 // Called when a dialog created by the extension associated with
29 // |web_contents| is closed.
30 virtual void OnDialogClosed(content::WebContents* web_contents) = 0;
32 // Sets the name of the extensions associated with the
33 // |web_contents| in the |name_out| if there is one, returning true;
34 // returns false otherwise.
35 virtual bool GetExtensionName(content::WebContents* web_contents,
36 const GURL& origin_url,
37 std::string* name_out) = 0;
40 } // namespace app_modal
42 #endif // COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_EXTENSIONS_CLIENT_H_