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_install_view_controller.h" | 5 #import "chrome/browser/ui/cocoa/extensions/extension_install_view_controller.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 } | 257 } |
258 | 258 |
259 - (IBAction)storeLinkClicked:(id)sender { | 259 - (IBAction)storeLinkClicked:(id)sender { |
260 GURL store_url(extension_urls::GetWebstoreItemDetailURLPrefix() + | 260 GURL store_url(extension_urls::GetWebstoreItemDetailURLPrefix() + |
261 prompt_->extension()->id()); | 261 prompt_->extension()->id()); |
262 OpenURLParams params(store_url, Referrer(), NEW_FOREGROUND_TAB, | 262 OpenURLParams params(store_url, Referrer(), NEW_FOREGROUND_TAB, |
263 ui::PAGE_TRANSITION_LINK, false); | 263 ui::PAGE_TRANSITION_LINK, false); |
264 if (navigator_) { | 264 if (navigator_) { |
265 navigator_->OpenURL(params); | 265 navigator_->OpenURL(params); |
266 } else { | 266 } else { |
267 chrome::ScopedTabbedBrowserDisplayer displayer( | 267 chrome::ScopedTabbedBrowserDisplayer displayer(profile_); |
268 profile_, chrome::GetActiveDesktop()); | |
269 displayer.browser()->OpenURL(params); | 268 displayer.browser()->OpenURL(params); |
270 } | 269 } |
271 | 270 |
272 delegate_->OnStoreLinkClicked(); | 271 delegate_->OnStoreLinkClicked(); |
273 } | 272 } |
274 | 273 |
275 - (IBAction)cancel:(id)sender { | 274 - (IBAction)cancel:(id)sender { |
276 delegate_->OnCancelButtonClicked(); | 275 delegate_->OnCancelButtonClicked(); |
277 } | 276 } |
278 | 277 |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 } | 857 } |
859 | 858 |
860 - (void)accessibilityPerformAction:(NSString*)action { | 859 - (void)accessibilityPerformAction:(NSString*)action { |
861 if ([action isEqualToString:NSAccessibilityPressAction]) | 860 if ([action isEqualToString:NSAccessibilityPressAction]) |
862 [self handleLinkClicked]; | 861 [self handleLinkClicked]; |
863 else | 862 else |
864 [super accessibilityPerformAction:action]; | 863 [super accessibilityPerformAction:action]; |
865 } | 864 } |
866 | 865 |
867 @end | 866 @end |
OLD | NEW |