OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/browser_actions_container.h" | 5 #include "chrome/browser/views/browser_actions_container.h" |
6 | 6 |
7 #include "app/gfx/canvas.h" | 7 #include "app/gfx/canvas.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "app/slide_animation.h" | 9 #include "app/slide_animation.h" |
10 #include "base/stl_util-inl.h" | 10 #include "base/stl_util-inl.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 gfx::Insets BrowserActionButton::GetInsets() const { | 132 gfx::Insets BrowserActionButton::GetInsets() const { |
133 static gfx::Insets zero_inset; | 133 static gfx::Insets zero_inset; |
134 return zero_inset; | 134 return zero_inset; |
135 } | 135 } |
136 | 136 |
137 void BrowserActionButton::ButtonPressed(views::Button* sender, | 137 void BrowserActionButton::ButtonPressed(views::Button* sender, |
138 const views::Event& event) { | 138 const views::Event& event) { |
139 panel_->OnBrowserActionExecuted(this, false); // inspect_with_devtools | 139 panel_->OnBrowserActionExecuted(this, false); // inspect_with_devtools |
140 } | 140 } |
141 | 141 |
142 void BrowserActionButton::OnImageLoaded(SkBitmap* image, size_t index) { | 142 void BrowserActionButton::OnImageLoaded(ImageLoadingTracker* source, |
| 143 SkBitmap* image, size_t index) { |
143 if (image) | 144 if (image) |
144 default_icon_ = *image; | 145 default_icon_ = *image; |
145 | 146 |
146 tracker_ = NULL; // The tracker object will delete itself when we return. | 147 tracker_ = NULL; // The tracker object will delete itself when we return. |
147 | 148 |
148 // Call back to UpdateState() because a more specific icon might have been set | 149 // Call back to UpdateState() because a more specific icon might have been set |
149 // while the load was outstanding. | 150 // while the load was outstanding. |
150 UpdateState(); | 151 UpdateState(); |
151 } | 152 } |
152 | 153 |
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 popup_ = NULL; | 1087 popup_ = NULL; |
1087 popup_button_->SetButtonNotPushed(); | 1088 popup_button_->SetButtonNotPushed(); |
1088 popup_button_ = NULL; | 1089 popup_button_ = NULL; |
1089 } | 1090 } |
1090 | 1091 |
1091 bool BrowserActionsContainer::ShouldDisplayBrowserAction(Extension* extension) { | 1092 bool BrowserActionsContainer::ShouldDisplayBrowserAction(Extension* extension) { |
1092 // Only display incognito-enabled extensions while in incognito mode. | 1093 // Only display incognito-enabled extensions while in incognito mode. |
1093 return (!profile_->IsOffTheRecord() || | 1094 return (!profile_->IsOffTheRecord() || |
1094 profile_->GetExtensionsService()->IsIncognitoEnabled(extension)); | 1095 profile_->GetExtensionsService()->IsIncognitoEnabled(extension)); |
1095 } | 1096 } |
OLD | NEW |