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_, signin_metrics::ACCESS_POINT_EXTENSION_INSTALL_BUBBLE); |
229 return YES; | 229 return YES; |
230 } | 230 } |
231 | 231 |
232 // Extracted to a function here so that it can be overridden for unit testing. | 232 // Extracted to a function here so that it can be overridden for unit testing. |
233 - (void)removePageActionPreviewIfNecessary { | 233 - (void)removePageActionPreviewIfNecessary { |
234 if (![self extension] || !pageActionPreviewShowing_) | 234 if (![self extension] || !pageActionPreviewShowing_) |
235 return; | 235 return; |
236 ExtensionAction* page_action = | 236 ExtensionAction* page_action = |
237 extensions::ExtensionActionManager::Get(browser_->profile())-> | 237 extensions::ExtensionActionManager::Get(browser_->profile())-> |
238 GetPageAction(*[self extension]); | 238 GetPageAction(*[self extension]); |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 [self close]; | 653 [self close]; |
654 } | 654 } |
655 | 655 |
656 - (void)awakeFromNib { | 656 - (void)awakeFromNib { |
657 if (bundle_) | 657 if (bundle_) |
658 return; | 658 return; |
659 [self initializeLabel]; | 659 [self initializeLabel]; |
660 } | 660 } |
661 | 661 |
662 @end | 662 @end |
OLD | NEW |