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 #include "chrome/browser/ui/views/extensions/extension_install_dialog_view.h" | 5 #include "chrome/browser/ui/views/extensions/extension_install_dialog_view.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 GURL store_url(extension_urls::GetWebstoreItemDetailURLPrefix() + | 623 GURL store_url(extension_urls::GetWebstoreItemDetailURLPrefix() + |
624 prompt_->extension()->id()); | 624 prompt_->extension()->id()); |
625 OpenURLParams params( | 625 OpenURLParams params( |
626 store_url, Referrer(), NEW_FOREGROUND_TAB, | 626 store_url, Referrer(), NEW_FOREGROUND_TAB, |
627 ui::PAGE_TRANSITION_LINK, | 627 ui::PAGE_TRANSITION_LINK, |
628 false); | 628 false); |
629 | 629 |
630 if (navigator_) { | 630 if (navigator_) { |
631 navigator_->OpenURL(params); | 631 navigator_->OpenURL(params); |
632 } else { | 632 } else { |
633 chrome::ScopedTabbedBrowserDisplayer displayer( | 633 chrome::ScopedTabbedBrowserDisplayer displayer(profile_); |
634 profile_, chrome::GetActiveDesktop()); | |
635 displayer.browser()->OpenURL(params); | 634 displayer.browser()->OpenURL(params); |
636 } | 635 } |
637 GetWidget()->Close(); | 636 GetWidget()->Close(); |
638 } | 637 } |
639 | 638 |
640 void ExtensionInstallDialogView::Layout() { | 639 void ExtensionInstallDialogView::Layout() { |
641 container_->SetBounds(0, 0, width(), height()); | 640 container_->SetBounds(0, 0, width(), height()); |
642 DialogDelegateView::Layout(); | 641 DialogDelegateView::Layout(); |
643 } | 642 } |
644 | 643 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 expanded ? gfx::VectorIconId::FIND_PREV : gfx::VectorIconId::FIND_NEXT, | 834 expanded ? gfx::VectorIconId::FIND_PREV : gfx::VectorIconId::FIND_NEXT, |
836 16, gfx::kChromeIconGrey); | 835 16, gfx::kChromeIconGrey); |
837 arrow_toggle_->SetImage(views::Button::STATE_NORMAL, &icon); | 836 arrow_toggle_->SetImage(views::Button::STATE_NORMAL, &icon); |
838 } | 837 } |
839 | 838 |
840 // static | 839 // static |
841 ExtensionInstallPrompt::ShowDialogCallback | 840 ExtensionInstallPrompt::ShowDialogCallback |
842 ExtensionInstallPrompt::GetDefaultShowDialogCallback() { | 841 ExtensionInstallPrompt::GetDefaultShowDialogCallback() { |
843 return base::Bind(&ShowExtensionInstallDialogImpl); | 842 return base::Bind(&ShowExtensionInstallDialogImpl); |
844 } | 843 } |
OLD | NEW |