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

Side by Side Diff: chrome/browser/plugins/plugin_observer.h

Issue 2405013002: Move some global feature defines to buildflags (Closed)
Patch Set: Comment Created 4 years, 2 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
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_PLUGINS_PLUGIN_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_OBSERVER_H_
6 #define CHROME_BROWSER_PLUGINS_PLUGIN_OBSERVER_H_ 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_OBSERVER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "chrome/common/features.h"
13 #include "components/component_updater/component_updater_service.h" 14 #include "components/component_updater/component_updater_service.h"
14 #include "content/public/browser/web_contents_observer.h" 15 #include "content/public/browser/web_contents_observer.h"
15 #include "content/public/browser/web_contents_user_data.h" 16 #include "content/public/browser/web_contents_user_data.h"
16 17
17 #if defined(ENABLE_PLUGIN_INSTALLATION) 18 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
18 #include <map> 19 #include <map>
19 #endif 20 #endif
20 21
21 class GURL; 22 class GURL;
22 class PluginFinder; 23 class PluginFinder;
23 class PluginMetadata; 24 class PluginMetadata;
24 25
25 #if defined(ENABLE_PLUGIN_INSTALLATION) 26 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
26 class PluginInstaller; 27 class PluginInstaller;
27 class PluginPlaceholderHost; 28 class PluginPlaceholderHost;
28 #endif 29 #endif
29 30
30 namespace content { 31 namespace content {
31 class WebContents; 32 class WebContents;
32 } 33 }
33 34
34 namespace infobars { 35 namespace infobars {
35 class InfoBarDelegate; 36 class InfoBarDelegate;
(...skipping 17 matching lines...) Expand all
53 54
54 class PluginPlaceholderHost; 55 class PluginPlaceholderHost;
55 56
56 // Message handlers: 57 // Message handlers:
57 void OnBlockedUnauthorizedPlugin(const base::string16& name, 58 void OnBlockedUnauthorizedPlugin(const base::string16& name,
58 const std::string& identifier); 59 const std::string& identifier);
59 void OnBlockedOutdatedPlugin(int placeholder_id, 60 void OnBlockedOutdatedPlugin(int placeholder_id,
60 const std::string& identifier); 61 const std::string& identifier);
61 void OnBlockedComponentUpdatedPlugin(int placeholder_id, 62 void OnBlockedComponentUpdatedPlugin(int placeholder_id,
62 const std::string& identifier); 63 const std::string& identifier);
63 #if defined(ENABLE_PLUGIN_INSTALLATION) 64 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
64 void OnRemovePluginPlaceholderHost(int placeholder_id); 65 void OnRemovePluginPlaceholderHost(int placeholder_id);
65 #endif 66 #endif
66 void RemoveComponentObserver(int placeholder_id); 67 void RemoveComponentObserver(int placeholder_id);
67 void OnOpenAboutPlugins(); 68 void OnOpenAboutPlugins();
68 void OnShowFlashPermissionBubble(); 69 void OnShowFlashPermissionBubble();
69 void OnCouldNotLoadPlugin(const base::FilePath& plugin_path); 70 void OnCouldNotLoadPlugin(const base::FilePath& plugin_path);
70 71
71 #if defined(ENABLE_PLUGIN_INSTALLATION) 72 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
72 // Stores all PluginPlaceholderHosts, keyed by their routing ID. 73 // Stores all PluginPlaceholderHosts, keyed by their routing ID.
73 std::map<int, PluginPlaceholderHost*> plugin_placeholders_; 74 std::map<int, PluginPlaceholderHost*> plugin_placeholders_;
74 #endif 75 #endif
75 76
76 // Stores all ComponentObservers, keyed by their routing ID. 77 // Stores all ComponentObservers, keyed by their routing ID.
77 std::map<int, std::unique_ptr<ComponentObserver>> component_observers_; 78 std::map<int, std::unique_ptr<ComponentObserver>> component_observers_;
78 79
79 base::WeakPtrFactory<PluginObserver> weak_ptr_factory_; 80 base::WeakPtrFactory<PluginObserver> weak_ptr_factory_;
80 81
81 DISALLOW_COPY_AND_ASSIGN(PluginObserver); 82 DISALLOW_COPY_AND_ASSIGN(PluginObserver);
82 }; 83 };
83 84
84 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_OBSERVER_H_ 85 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_infobar_delegates.cc ('k') | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698