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

Side by Side Diff: chrome/common/extensions/extension_action.cc

Issue 10837155: Persist browserAction settings to the extension StateStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 8 years, 4 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/common/extensions/extension_action.h" 5 #include "chrome/common/extensions/extension_action.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/common/badge_util.h" 10 #include "chrome/common/badge_util.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 169
170 ExtensionAction::IconAnimation::ScopedObserver::~ScopedObserver() { 170 ExtensionAction::IconAnimation::ScopedObserver::~ScopedObserver() {
171 if (icon_animation_.get()) 171 if (icon_animation_.get())
172 icon_animation_->RemoveObserver(observer_); 172 icon_animation_->RemoveObserver(observer_);
173 } 173 }
174 174
175 ExtensionAction::ExtensionAction(const std::string& extension_id, 175 ExtensionAction::ExtensionAction(const std::string& extension_id,
176 Type action_type) 176 Type action_type)
177 : extension_id_(extension_id), 177 : extension_id_(extension_id),
178 action_type_(action_type) { 178 action_type_(action_type),
179 defaults_have_changed_(false) {
179 } 180 }
180 181
181 ExtensionAction::~ExtensionAction() { 182 ExtensionAction::~ExtensionAction() {
182 } 183 }
183 184
184 scoped_ptr<ExtensionAction> ExtensionAction::CopyForTest() const { 185 scoped_ptr<ExtensionAction> ExtensionAction::CopyForTest() const {
185 scoped_ptr<ExtensionAction> copy( 186 scoped_ptr<ExtensionAction> copy(
186 new ExtensionAction(extension_id_, action_type_)); 187 new ExtensionAction(extension_id_, action_type_));
187 copy->popup_url_ = popup_url_; 188 copy->popup_url_ = popup_url_;
188 copy->title_ = title_; 189 copy->title_ = title_;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 return orig; 423 return orig;
423 return gfx::Image(wrapper->animation()->Apply(*orig.ToSkBitmap())); 424 return gfx::Image(wrapper->animation()->Apply(*orig.ToSkBitmap()));
424 } 425 }
425 426
426 void ExtensionAction::RunIconAnimation(int tab_id) { 427 void ExtensionAction::RunIconAnimation(int tab_id) {
427 IconAnimationWrapper* icon_animation = 428 IconAnimationWrapper* icon_animation =
428 new IconAnimationWrapper(); 429 new IconAnimationWrapper();
429 icon_animation_[tab_id] = icon_animation->AsWeakPtr(); 430 icon_animation_[tab_id] = icon_animation->AsWeakPtr();
430 icon_animation->animation()->Start(); 431 icon_animation->animation()->Start();
431 } 432 }
OLDNEW
« chrome/common/extensions/extension_action.h ('K') | « chrome/common/extensions/extension_action.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698