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

Side by Side Diff: chrome/browser/extensions/api/extension_action/extension_action_api.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 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
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 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" 5 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 return visible; 158 return visible;
159 } 159 }
160 160
161 void ExtensionActionAPI::SetBrowserActionVisibility( 161 void ExtensionActionAPI::SetBrowserActionVisibility(
162 const std::string& extension_id, 162 const std::string& extension_id,
163 bool visible) { 163 bool visible) {
164 if (GetBrowserActionVisibility(extension_id) == visible) 164 if (GetBrowserActionVisibility(extension_id) == visible)
165 return; 165 return;
166 166
167 GetExtensionPrefs()->UpdateExtensionPref(extension_id, 167 GetExtensionPrefs()->UpdateExtensionPref(extension_id, kBrowserActionVisible,
168 kBrowserActionVisible, 168 new base::Value(visible));
169 new base::FundamentalValue(visible));
170 for (auto& observer : observers_) 169 for (auto& observer : observers_)
171 observer.OnExtensionActionVisibilityChanged(extension_id, visible); 170 observer.OnExtensionActionVisibilityChanged(extension_id, visible);
172 } 171 }
173 172
174 bool ExtensionActionAPI::ShowExtensionActionPopup( 173 bool ExtensionActionAPI::ShowExtensionActionPopup(
175 const Extension* extension, 174 const Extension* extension,
176 Browser* browser, 175 Browser* browser,
177 bool grant_active_tab_permissions) { 176 bool grant_active_tab_permissions) {
178 ExtensionAction* extension_action = 177 ExtensionAction* extension_action =
179 ExtensionActionManager::Get(browser_context_)->GetExtensionAction( 178 ExtensionActionManager::Get(browser_context_)->GetExtensionAction(
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 if (host->extension_host_type() != VIEW_TYPE_EXTENSION_POPUP || 626 if (host->extension_host_type() != VIEW_TYPE_EXTENSION_POPUP ||
628 host->extension()->id() != extension_->id()) 627 host->extension()->id() != extension_->id())
629 return; 628 return;
630 629
631 SendResponse(true); 630 SendResponse(true);
632 response_sent_ = true; 631 response_sent_ = true;
633 registrar_.RemoveAll(); 632 registrar_.RemoveAll();
634 } 633 }
635 634
636 } // namespace extensions 635 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698