summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/webui/extensions/extension_info_ui.h
blob: 2f582727bcb346c5aa693744d5e87217cfaa66c6 (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
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_INFO_UI_H_
#define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_INFO_UI_H_

#include "content/public/browser/web_ui_controller.h"
#include "url/gurl.h"


namespace base {
class ListValue;
}

namespace content {
class WebUIDataSource;
}

namespace extensions {

// WebUI controller for the informative bubble shown on clicking a script badge.
class ExtensionInfoUI : public content::WebUIController {
 public:
  explicit ExtensionInfoUI(content::WebUI* web_ui, const GURL& url);

  // Returns the chrome://extension-info/ URL for this extension.
  static GURL GetURL(const std::string& extension_id);

 private:
  virtual ~ExtensionInfoUI();

  // Load details about the extension into source_. Called during construction.
  void AddExtensionDataToSource(const std::string& extension_id);

  content::WebUIDataSource* source_;

  DISALLOW_COPY_AND_ASSIGN(ExtensionInfoUI);
};

}  // namespace extensions

#endif  // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_INFO_UI_H_