| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/views/extensions/extension_installed_bubble.h" | 5 #include "chrome/browser/ui/views/extensions/extension_installed_bubble.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 views::Label* heading_; | 228 views::Label* heading_; |
| 229 views::Label* info_; | 229 views::Label* info_; |
| 230 views::Label* manage_; | 230 views::Label* manage_; |
| 231 views::ImageButton* close_button_; | 231 views::ImageButton* close_button_; |
| 232 | 232 |
| 233 DISALLOW_COPY_AND_ASSIGN(InstalledBubbleContent); | 233 DISALLOW_COPY_AND_ASSIGN(InstalledBubbleContent); |
| 234 }; | 234 }; |
| 235 | 235 |
| 236 void ExtensionInstalledBubble::Show(const Extension* extension, | 236 void ExtensionInstalledBubble::Show(const Extension* extension, |
| 237 Browser *browser, | 237 Browser *browser, |
| 238 SkBitmap icon) { | 238 const SkBitmap& icon) { |
| 239 new ExtensionInstalledBubble(extension, browser, icon); | 239 new ExtensionInstalledBubble(extension, browser, icon); |
| 240 } | 240 } |
| 241 | 241 |
| 242 ExtensionInstalledBubble::ExtensionInstalledBubble(const Extension* extension, | 242 ExtensionInstalledBubble::ExtensionInstalledBubble(const Extension* extension, |
| 243 Browser *browser, | 243 Browser *browser, |
| 244 SkBitmap icon) | 244 const SkBitmap& icon) |
| 245 : extension_(extension), | 245 : extension_(extension), |
| 246 browser_(browser), | 246 browser_(browser), |
| 247 icon_(icon), | 247 icon_(icon), |
| 248 animation_wait_retries_(0) { | 248 animation_wait_retries_(0) { |
| 249 AddRef(); // Balanced in InfoBubbleClosing. | 249 AddRef(); // Balanced in InfoBubbleClosing. |
| 250 | 250 |
| 251 if (!extension_->omnibox_keyword().empty()) { | 251 if (!extension_->omnibox_keyword().empty()) { |
| 252 type_ = OMNIBOX_KEYWORD; | 252 type_ = OMNIBOX_KEYWORD; |
| 253 } else if (extension_->browser_action()) { | 253 } else if (extension_->browser_action()) { |
| 254 type_ = BROWSER_ACTION; | 254 type_ = BROWSER_ACTION; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 Release(); // Balanced in ctor. | 373 Release(); // Balanced in ctor. |
| 374 } | 374 } |
| 375 | 375 |
| 376 bool ExtensionInstalledBubble::CloseOnEscape() { | 376 bool ExtensionInstalledBubble::CloseOnEscape() { |
| 377 return true; | 377 return true; |
| 378 } | 378 } |
| 379 | 379 |
| 380 bool ExtensionInstalledBubble::FadeInOnShow() { | 380 bool ExtensionInstalledBubble::FadeInOnShow() { |
| 381 return true; | 381 return true; |
| 382 } | 382 } |
| OLD | NEW |