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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 | 530 |
531 ui::ModalType ExtensionInstallDialogView::GetModalType() const { | 531 ui::ModalType ExtensionInstallDialogView::GetModalType() const { |
532 return prompt_->ShouldUseTabModalDialog() ? ui::MODAL_TYPE_CHILD | 532 return prompt_->ShouldUseTabModalDialog() ? ui::MODAL_TYPE_CHILD |
533 : ui::MODAL_TYPE_WINDOW; | 533 : ui::MODAL_TYPE_WINDOW; |
534 } | 534 } |
535 | 535 |
536 void ExtensionInstallDialogView::LinkClicked(views::Link* source, | 536 void ExtensionInstallDialogView::LinkClicked(views::Link* source, |
537 int event_flags) { | 537 int event_flags) { |
538 GURL store_url(extension_urls::GetWebstoreItemDetailURLPrefix() + | 538 GURL store_url(extension_urls::GetWebstoreItemDetailURLPrefix() + |
539 prompt_->extension()->id()); | 539 prompt_->extension()->id()); |
540 OpenURLParams params( | 540 OpenURLParams params(store_url, Referrer(), |
541 store_url, Referrer(), NEW_FOREGROUND_TAB, | 541 WindowOpenDisposition::NEW_FOREGROUND_TAB, |
542 ui::PAGE_TRANSITION_LINK, | 542 ui::PAGE_TRANSITION_LINK, false); |
543 false); | |
544 | 543 |
545 if (navigator_) { | 544 if (navigator_) { |
546 navigator_->OpenURL(params); | 545 navigator_->OpenURL(params); |
547 } else { | 546 } else { |
548 chrome::ScopedTabbedBrowserDisplayer displayer(profile_); | 547 chrome::ScopedTabbedBrowserDisplayer displayer(profile_); |
549 displayer.browser()->OpenURL(params); | 548 displayer.browser()->OpenURL(params); |
550 } | 549 } |
551 GetWidget()->Close(); | 550 GetWidget()->Close(); |
552 } | 551 } |
553 | 552 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 expanded ? gfx::VectorIconId::FIND_PREV : gfx::VectorIconId::FIND_NEXT, | 732 expanded ? gfx::VectorIconId::FIND_PREV : gfx::VectorIconId::FIND_NEXT, |
734 gfx::kChromeIconGrey); | 733 gfx::kChromeIconGrey); |
735 arrow_toggle_->SetImage(views::Button::STATE_NORMAL, &icon); | 734 arrow_toggle_->SetImage(views::Button::STATE_NORMAL, &icon); |
736 } | 735 } |
737 | 736 |
738 // static | 737 // static |
739 ExtensionInstallPrompt::ShowDialogCallback | 738 ExtensionInstallPrompt::ShowDialogCallback |
740 ExtensionInstallPrompt::GetViewsShowDialogCallback() { | 739 ExtensionInstallPrompt::GetViewsShowDialogCallback() { |
741 return base::Bind(&ShowExtensionInstallDialogImpl); | 740 return base::Bind(&ShowExtensionInstallDialogImpl); |
742 } | 741 } |
OLD | NEW |