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_dialog_controller.
h" | 5 #import "chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.
h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
9 #include "base/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 isGroupItem:YES | 527 isGroupItem:YES |
528 children:children]]; | 528 children:children]]; |
529 } | 529 } |
530 | 530 |
531 return warnings; | 531 return warnings; |
532 } | 532 } |
533 | 533 |
534 | 534 |
535 @end // ExtensionInstallDialogController | 535 @end // ExtensionInstallDialogController |
536 | 536 |
537 void ShowExtensionInstallDialogImpl( | 537 class ExtensionInstallDialogMac : public ExtensionInstallDialog { |
538 gfx::NativeWindow parent, | 538 public: |
539 content::PageNavigator* navigator, | 539 virtual void ShowExtensionInstallDialogImpl( |
540 ExtensionInstallPrompt::Delegate* delegate, | 540 gfx::NativeWindow parent, |
541 const ExtensionInstallPrompt::Prompt& prompt) { | 541 content::PageNavigator* navigator, |
542 ExtensionInstallDialogController* controller = | 542 ExtensionInstallPrompt::Delegate* delegate, |
543 [[ExtensionInstallDialogController alloc] | 543 const ExtensionInstallPrompt::Prompt& prompt) OVERRIDE { |
544 initWithParentWindow:parent | 544 ExtensionInstallDialogController* controller = |
545 navigator:navigator | 545 [[ExtensionInstallDialogController alloc] |
546 delegate:delegate | 546 initWithParentWindow:parent |
547 prompt:prompt]; | 547 navigator:navigator |
| 548 delegate:delegate |
| 549 prompt:prompt]; |
548 | 550 |
549 // TODO(mihaip): Switch this to be tab-modal (http://crbug.com/95455) | 551 // TODO(mihaip): Switch this to be tab-modal (http://crbug.com/95455) |
550 [controller runAsModalSheet]; | 552 [controller runAsModalSheet]; |
| 553 } |
| 554 |
| 555 private: |
| 556 ~ExtensionInstallDialogMac() { |
| 557 } |
| 558 }; |
| 559 |
| 560 // static |
| 561 scoped_refptr<ExtensionInstallDialog> |
| 562 ExtensionInstallDialog::CreateDefaultImpl() { |
| 563 return new ExtensionInstallDialogMac; |
551 } | 564 } |
OLD | NEW |