OLD | NEW |
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 #include "chrome/browser/extensions/api/system_indicator/system_indicator_manage
r.h" | 5 #include "chrome/browser/extensions/api/system_indicator/system_indicator_manage
r.h" |
6 | 6 |
7 #include "base/memory/linked_ptr.h" | 7 #include "base/memory/linked_ptr.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/extensions/extension_action.h" | 9 #include "chrome/browser/extensions/extension_action.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 class ExtensionIndicatorIcon : public StatusIconObserver, | 29 class ExtensionIndicatorIcon : public StatusIconObserver, |
30 public ExtensionActionIconFactory::Observer { | 30 public ExtensionActionIconFactory::Observer { |
31 public: | 31 public: |
32 static ExtensionIndicatorIcon* Create(const Extension* extension, | 32 static ExtensionIndicatorIcon* Create(const Extension* extension, |
33 const ExtensionAction* action, | 33 const ExtensionAction* action, |
34 Profile* profile, | 34 Profile* profile, |
35 StatusTray* status_tray); | 35 StatusTray* status_tray); |
36 virtual ~ExtensionIndicatorIcon(); | 36 virtual ~ExtensionIndicatorIcon(); |
37 | 37 |
38 // StatusIconObserver implementation. | 38 // StatusIconObserver implementation. |
39 virtual void OnStatusIconClicked() OVERRIDE; | 39 virtual void OnStatusIconClicked() override; |
40 | 40 |
41 // ExtensionActionIconFactory::Observer implementation. | 41 // ExtensionActionIconFactory::Observer implementation. |
42 virtual void OnIconUpdated() OVERRIDE; | 42 virtual void OnIconUpdated() override; |
43 | 43 |
44 private: | 44 private: |
45 ExtensionIndicatorIcon(const Extension* extension, | 45 ExtensionIndicatorIcon(const Extension* extension, |
46 const ExtensionAction* action, | 46 const ExtensionAction* action, |
47 Profile* profile, | 47 Profile* profile, |
48 StatusTray* status_tray); | 48 StatusTray* status_tray); |
49 | 49 |
50 const extensions::Extension* extension_; | 50 const extensions::Extension* extension_; |
51 StatusTray* status_tray_; | 51 StatusTray* status_tray_; |
52 StatusIcon* icon_; | 52 StatusIcon* icon_; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 if (extension_icon) | 189 if (extension_icon) |
190 system_indicators_[extension->id()] = make_linked_ptr(extension_icon); | 190 system_indicators_[extension->id()] = make_linked_ptr(extension_icon); |
191 } | 191 } |
192 | 192 |
193 void SystemIndicatorManager::RemoveIndicator(const std::string& extension_id) { | 193 void SystemIndicatorManager::RemoveIndicator(const std::string& extension_id) { |
194 DCHECK(thread_checker_.CalledOnValidThread()); | 194 DCHECK(thread_checker_.CalledOnValidThread()); |
195 system_indicators_.erase(extension_id); | 195 system_indicators_.erase(extension_id); |
196 } | 196 } |
197 | 197 |
198 } // namespace extensions | 198 } // namespace extensions |
OLD | NEW |