summaryrefslogtreecommitdiffstats
path: root/chromium/components/javascript_dialogs/extensions_client.h
blob: 5de2c08a352f682a1b44ff35129182259ffd1202 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_JAVASCRIPT_DIALOGS_EXTENSIONS_CLIENT_H_
#define COMPONENTS_JAVASCRIPT_DIALOGS_EXTENSIONS_CLIENT_H_

namespace content {
class WebContents;
}

namespace javascript_dialogs {

// A client interface to access and control extensions/apps
// that opened a JavaScript dialog.
class ExtensionsClient {
 public:
  virtual ~ExtensionsClient() = default;

  // Called when the extension associated with |web_contents| opened
  // a dialog.
  virtual void OnDialogOpened(content::WebContents* web_contents) = 0;

  // Called when a dialog created by the extension associated with
  // |web_contents| is closed.
  virtual void OnDialogClosed(content::WebContents* web_contents) = 0;
};

}  // namespace javascript_dialogs

#endif  // COMPONENTS_JAVASCRIPT_DIALOGS_EXTENSIONS_CLIENT_H_