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_DIALOGS_JAVASCRIPT_DIALOG_EXTENSIONS_CLIENT_H_
6 #define COMPONENTS_APP_MODAL_DIALOGS_JAVASCRIPT_DIALOG_EXTENSIONS_CLIENT_H_
16 // A client interface to access and control extensions/apps
17 // that opened a JavaScript dialog.
18 class JavaScriptDialogExtensionsClient {
20 virtual ~JavaScriptDialogExtensionsClient() {}
22 // Called when the extension associated with |web_contents| opened
24 virtual void OnDialogOpened(content::WebContents* web_contents) = 0;
26 // Called when a dialog created by the extension associated with
27 // |web_contents| is closed.
28 virtual void OnDialogClosed(content::WebContents* web_contents) = 0;
30 // Sets the name of the extensions associated with the
31 // |web_contents| in the |name_out| if there is one, returning true;
32 // returns false otherwise.
33 virtual bool GetExtensionName(content::WebContents* web_contents,
34 const GURL& origin_url,
35 std::string* name_out) = 0;
38 #endif // COMPONENTS_APP_MODAL_DIALOGS_JAVASCRIPT_DIALOG_EXTENSIONS_CLIENT_H_