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_
18 // A client interface to access and control extensions/apps
19 // that opened a JavaScript dialog.
20 class JavaScriptDialogExtensionsClient
{
22 virtual ~JavaScriptDialogExtensionsClient() {}
24 // Called when the extension associated with |web_contents| opened
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_