Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: chrome/browser/plugin_installer.h

Issue 9536013: Move |requires_authorization| flag for plug-ins out of webkit/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/plugin_finder_unittest.cc ('k') | chrome/browser/plugin_installer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PLUGIN_INSTALLER_H_ 5 #ifndef CHROME_BROWSER_PLUGIN_INSTALLER_H_
6 #define CHROME_BROWSER_PLUGIN_INSTALLER_H_ 6 #define CHROME_BROWSER_PLUGIN_INSTALLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 15 matching lines...) Expand all
26 public: 26 public:
27 enum State { 27 enum State {
28 kStateIdle, 28 kStateIdle,
29 kStateDownloading, 29 kStateDownloading,
30 }; 30 };
31 31
32 PluginInstaller(const std::string& identifier, 32 PluginInstaller(const std::string& identifier,
33 const GURL& plugin_url, 33 const GURL& plugin_url,
34 const GURL& help_url, 34 const GURL& help_url,
35 const string16& name, 35 const string16& name,
36 bool url_for_display); 36 bool url_for_display,
37 bool requires_authorization);
37 virtual ~PluginInstaller(); 38 virtual ~PluginInstaller();
38 39
39 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; 40 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE;
40 41
41 virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE; 42 virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE;
42 43
43 void AddObserver(PluginInstallerObserver* observer); 44 void AddObserver(PluginInstallerObserver* observer);
44 void RemoveObserver(PluginInstallerObserver* observer); 45 void RemoveObserver(PluginInstallerObserver* observer);
45 46
46 void AddWeakObserver(WeakPluginInstallerObserver* observer); 47 void AddWeakObserver(WeakPluginInstallerObserver* observer);
47 void RemoveWeakObserver(WeakPluginInstallerObserver* observer); 48 void RemoveWeakObserver(WeakPluginInstallerObserver* observer);
48 49
49 State state() const { return state_; } 50 State state() const { return state_; }
50 51
51 // Unique identifier for the plug-in. Should be kept in sync with the 52 // Unique identifier for the plug-in. Should be kept in sync with the
52 // identifier in plugin_list.cc. 53 // identifier in plugin_list.cc.
53 const std::string& identifier() const { return identifier_; } 54 const std::string& identifier() const { return identifier_; }
54 55
55 // Human-readable name of the plug-in. 56 // Human-readable name of the plug-in.
56 const string16& name() const { return name_; } 57 const string16& name() const { return name_; }
57 58
59 // Whether the plug-in requires user authorization to run.
60 bool requires_authorization() const { return requires_authorization_; }
61
58 // If |url_for_display| is false, |plugin_url| is the URL of the download page 62 // If |url_for_display| is false, |plugin_url| is the URL of the download page
59 // for the plug-in, which should be opened in a new tab. If it is true, 63 // for the plug-in, which should be opened in a new tab. If it is true,
60 // |plugin_url| is the URL of the plug-in installer binary, which can be 64 // |plugin_url| is the URL of the plug-in installer binary, which can be
61 // directly downloaded. 65 // directly downloaded.
62 bool url_for_display() const { return url_for_display_; } 66 bool url_for_display() const { return url_for_display_; }
63 const GURL& plugin_url() const { return plugin_url_; } 67 const GURL& plugin_url() const { return plugin_url_; }
64 68
65 // URL to open when the user clicks on the "Problems installing?" link. 69 // URL to open when the user clicks on the "Problems installing?" link.
66 const GURL& help_url() const { return help_url_; } 70 const GURL& help_url() const { return help_url_; }
67 71
(...skipping 15 matching lines...) Expand all
83 87
84 State state_; 88 State state_;
85 ObserverList<PluginInstallerObserver> observers_; 89 ObserverList<PluginInstallerObserver> observers_;
86 ObserverList<WeakPluginInstallerObserver> weak_observers_; 90 ObserverList<WeakPluginInstallerObserver> weak_observers_;
87 91
88 std::string identifier_; 92 std::string identifier_;
89 GURL plugin_url_; 93 GURL plugin_url_;
90 GURL help_url_; 94 GURL help_url_;
91 string16 name_; 95 string16 name_;
92 bool url_for_display_; 96 bool url_for_display_;
97 bool requires_authorization_;
93 98
94 DISALLOW_COPY_AND_ASSIGN(PluginInstaller); 99 DISALLOW_COPY_AND_ASSIGN(PluginInstaller);
95 }; 100 };
96 101
97 #endif // CHROME_BROWSER_PLUGIN_INSTALLER_H_ 102 #endif // CHROME_BROWSER_PLUGIN_INSTALLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/plugin_finder_unittest.cc ('k') | chrome/browser/plugin_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698