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 #import "chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.
h" | 5 #import "chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.
h" |
6 | 6 |
7 #include "base/mac/mac_util.h" | 7 #include "base/mac/mac_util.h" |
8 #include "base/memory/scoped_nsobject.h" | 8 #include "base/memory/scoped_nsobject.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 modalForWindow:parentWindow_ | 118 modalForWindow:parentWindow_ |
119 modalDelegate:self | 119 modalDelegate:self |
120 didEndSelector:@selector(didEndSheet:returnCode:contextInfo:) | 120 didEndSelector:@selector(didEndSheet:returnCode:contextInfo:) |
121 contextInfo:nil]; | 121 contextInfo:nil]; |
122 } | 122 } |
123 | 123 |
124 - (IBAction)storeLinkClicked:(id)sender { | 124 - (IBAction)storeLinkClicked:(id)sender { |
125 GURL store_url( | 125 GURL store_url( |
126 extension_urls::GetWebstoreItemDetailURLPrefix() + extension_->id()); | 126 extension_urls::GetWebstoreItemDetailURLPrefix() + extension_->id()); |
127 BrowserList::GetLastActiveWithProfile(profile_)-> | 127 BrowserList::GetLastActiveWithProfile(profile_)-> |
128 OpenURL(store_url, GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); | 128 OpenURL(store_url, GURL(), NEW_FOREGROUND_TAB, |
| 129 content::PAGE_TRANSITION_LINK); |
129 | 130 |
130 delegate_->InstallUIAbort(/*user_initiated=*/true); | 131 delegate_->InstallUIAbort(/*user_initiated=*/true); |
131 [NSApp endSheet:[self window]]; | 132 [NSApp endSheet:[self window]]; |
132 } | 133 } |
133 | 134 |
134 - (IBAction)cancel:(id)sender { | 135 - (IBAction)cancel:(id)sender { |
135 delegate_->InstallUIAbort(/*user_initiated=*/true); | 136 delegate_->InstallUIAbort(/*user_initiated=*/true); |
136 [NSApp endSheet:[self window]]; | 137 [NSApp endSheet:[self window]]; |
137 } | 138 } |
138 | 139 |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 initWithParentWindow:native_window | 313 initWithParentWindow:native_window |
313 profile:profile | 314 profile:profile |
314 extension:extension | 315 extension:extension |
315 delegate:delegate | 316 delegate:delegate |
316 icon:icon | 317 icon:icon |
317 prompt:prompt]; | 318 prompt:prompt]; |
318 | 319 |
319 // TODO(mihaip): Switch this to be tab-modal (http://crbug.com/95455) | 320 // TODO(mihaip): Switch this to be tab-modal (http://crbug.com/95455) |
320 [controller runAsModalSheet]; | 321 [controller runAsModalSheet]; |
321 } | 322 } |
OLD | NEW |