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

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

Issue 16295003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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
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 <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 return false; 457 return false;
458 } 458 }
459 459
460 return true; 460 return true;
461 } 461 }
462 462
463 void ExtensionActionFunction::NotifyChange() { 463 void ExtensionActionFunction::NotifyChange() {
464 switch (extension_action_->action_type()) { 464 switch (extension_action_->action_type()) {
465 case ActionInfo::TYPE_BROWSER: 465 case ActionInfo::TYPE_BROWSER:
466 case ActionInfo::TYPE_PAGE: 466 case ActionInfo::TYPE_PAGE:
467 if (ExtensionActionManager::Get(profile_)-> 467 if (ExtensionActionManager::Get(profile_)
468 GetBrowserAction(*extension_)) { 468 ->GetBrowserAction(*extension_.get())) {
469 NotifyBrowserActionChange(); 469 NotifyBrowserActionChange();
470 } else if (ExtensionActionManager::Get(profile_)-> 470 } else if (ExtensionActionManager::Get(profile_)
471 GetPageAction(*extension_)) { 471 ->GetPageAction(*extension_.get())) {
472 NotifyLocationBarChange(); 472 NotifyLocationBarChange();
473 } 473 }
474 return; 474 return;
475 case ActionInfo::TYPE_SCRIPT_BADGE: 475 case ActionInfo::TYPE_SCRIPT_BADGE:
476 NotifyLocationBarChange(); 476 NotifyLocationBarChange();
477 return; 477 return;
478 case ActionInfo::TYPE_SYSTEM_INDICATOR: 478 case ActionInfo::TYPE_SYSTEM_INDICATOR:
479 NotifySystemIndicatorChange(); 479 NotifySystemIndicatorChange();
480 return; 480 return;
481 } 481 }
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 return true; 759 return true;
760 } 760 }
761 761
762 bool EnablePageActionsFunction::RunImpl() { 762 bool EnablePageActionsFunction::RunImpl() {
763 return SetPageActionEnabled(true); 763 return SetPageActionEnabled(true);
764 } 764 }
765 765
766 bool DisablePageActionsFunction::RunImpl() { 766 bool DisablePageActionsFunction::RunImpl() {
767 return SetPageActionEnabled(false); 767 return SetPageActionEnabled(false);
768 } 768 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698