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> |
| 10 |
9 #include "base/auto_reset.h" | 11 #include "base/auto_reset.h" |
10 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
11 #include "base/mac/bundle_locations.h" | 13 #include "base/mac/bundle_locations.h" |
12 #include "base/mac/mac_util.h" | 14 #include "base/mac/mac_util.h" |
13 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
14 #include "base/strings/sys_string_conversions.h" | 16 #include "base/strings/sys_string_conversions.h" |
15 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
16 #include "chrome/browser/extensions/bundle_installer.h" | 18 #include "chrome/browser/extensions/bundle_installer.h" |
17 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/ui/browser.h" | 20 #include "chrome/browser/ui/browser.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 nibName = @"ExtensionInstallPromptNoWarnings"; | 243 nibName = @"ExtensionInstallPromptNoWarnings"; |
242 } else { | 244 } else { |
243 nibName = @"ExtensionInstallPrompt"; | 245 nibName = @"ExtensionInstallPrompt"; |
244 } | 246 } |
245 | 247 |
246 if ((self = [super initWithNibName:nibName | 248 if ((self = [super initWithNibName:nibName |
247 bundle:base::mac::FrameworkBundle()])) { | 249 bundle:base::mac::FrameworkBundle()])) { |
248 profile_ = profile; | 250 profile_ = profile; |
249 navigator_ = navigator; | 251 navigator_ = navigator; |
250 delegate_ = delegate; | 252 delegate_ = delegate; |
251 prompt_ = prompt.Pass(); | 253 prompt_ = std::move(prompt); |
252 warnings_.reset([[self buildWarnings:*prompt_] retain]); | 254 warnings_.reset([[self buildWarnings:*prompt_] retain]); |
253 } | 255 } |
254 return self; | 256 return self; |
255 } | 257 } |
256 | 258 |
257 - (IBAction)storeLinkClicked:(id)sender { | 259 - (IBAction)storeLinkClicked:(id)sender { |
258 GURL store_url(extension_urls::GetWebstoreItemDetailURLPrefix() + | 260 GURL store_url(extension_urls::GetWebstoreItemDetailURLPrefix() + |
259 prompt_->extension()->id()); | 261 prompt_->extension()->id()); |
260 OpenURLParams params(store_url, Referrer(), NEW_FOREGROUND_TAB, | 262 OpenURLParams params(store_url, Referrer(), NEW_FOREGROUND_TAB, |
261 ui::PAGE_TRANSITION_LINK, false); | 263 ui::PAGE_TRANSITION_LINK, false); |
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 } | 858 } |
857 | 859 |
858 - (void)accessibilityPerformAction:(NSString*)action { | 860 - (void)accessibilityPerformAction:(NSString*)action { |
859 if ([action isEqualToString:NSAccessibilityPressAction]) | 861 if ([action isEqualToString:NSAccessibilityPressAction]) |
860 [self handleLinkClicked]; | 862 [self handleLinkClicked]; |
861 else | 863 else |
862 [super accessibilityPerformAction:action]; | 864 [super accessibilityPerformAction:action]; |
863 } | 865 } |
864 | 866 |
865 @end | 867 @end |
OLD | NEW |