OLD | NEW |
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 #import "chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controlle
r.h" | 5 #import "chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controlle
r.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 DCHECK([self bubbleReference]); | 217 DCHECK([self bubbleReference]); |
218 bool didClose = | 218 bool didClose = |
219 [self bubbleReference]->CloseBubble(BUBBLE_CLOSE_USER_DISMISSED); | 219 [self bubbleReference]->CloseBubble(BUBBLE_CLOSE_USER_DISMISSED); |
220 DCHECK(didClose); | 220 DCHECK(didClose); |
221 } | 221 } |
222 | 222 |
223 - (BOOL)textView:(NSTextView*)aTextView | 223 - (BOOL)textView:(NSTextView*)aTextView |
224 clickedOnLink:(id)link | 224 clickedOnLink:(id)link |
225 atIndex:(NSUInteger)charIndex { | 225 atIndex:(NSUInteger)charIndex { |
226 DCHECK_EQ(promo_.get(), aTextView); | 226 DCHECK_EQ(promo_.get(), aTextView); |
227 chrome::ShowBrowserSignin(browser_, | 227 chrome::ShowBrowserSignin( |
228 signin_metrics::SOURCE_EXTENSION_INSTALL_BUBBLE); | 228 browser_, |
| 229 signin_metrics::AccessPoint::ACCESS_POINT_EXTENSION_INSTALL_BUBBLE); |
229 return YES; | 230 return YES; |
230 } | 231 } |
231 | 232 |
232 // Extracted to a function here so that it can be overridden for unit testing. | 233 // Extracted to a function here so that it can be overridden for unit testing. |
233 - (void)removePageActionPreviewIfNecessary { | 234 - (void)removePageActionPreviewIfNecessary { |
234 if (![self extension] || !pageActionPreviewShowing_) | 235 if (![self extension] || !pageActionPreviewShowing_) |
235 return; | 236 return; |
236 ExtensionAction* page_action = | 237 ExtensionAction* page_action = |
237 extensions::ExtensionActionManager::Get(browser_->profile())-> | 238 extensions::ExtensionActionManager::Get(browser_->profile())-> |
238 GetPageAction(*[self extension]); | 239 GetPageAction(*[self extension]); |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 [self close]; | 654 [self close]; |
654 } | 655 } |
655 | 656 |
656 - (void)awakeFromNib { | 657 - (void)awakeFromNib { |
657 if (bundle_) | 658 if (bundle_) |
658 return; | 659 return; |
659 [self initializeLabel]; | 660 [self initializeLabel]; |
660 } | 661 } |
661 | 662 |
662 @end | 663 @end |
OLD | NEW |