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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 displayer.browser()->OpenURL(params); | 574 displayer.browser()->OpenURL(params); |
575 } | 575 } |
576 GetWidget()->Close(); | 576 GetWidget()->Close(); |
577 } | 577 } |
578 | 578 |
579 void ExtensionInstallDialogView::Layout() { | 579 void ExtensionInstallDialogView::Layout() { |
580 container_->SetBounds(0, 0, width(), height()); | 580 container_->SetBounds(0, 0, width(), height()); |
581 DialogDelegateView::Layout(); | 581 DialogDelegateView::Layout(); |
582 } | 582 } |
583 | 583 |
584 gfx::Size ExtensionInstallDialogView::GetPreferredSize() const { | 584 gfx::Size ExtensionInstallDialogView::GetUnsnappedPreferredSize() const { |
585 return dialog_size_; | 585 return dialog_size_; |
586 } | 586 } |
587 | 587 |
588 views::View* ExtensionInstallDialogView::CreateExtraView() { | 588 views::View* ExtensionInstallDialogView::CreateExtraView() { |
589 if (!prompt_->has_webstore_data()) | 589 if (!prompt_->has_webstore_data()) |
590 return nullptr; | 590 return nullptr; |
591 | 591 |
592 views::Link* store_link = new views::Link( | 592 views::Link* store_link = new views::Link( |
593 l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_STORE_LINK)); | 593 l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_STORE_LINK)); |
594 store_link->set_listener(this); | 594 store_link->set_listener(this); |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 gfx::ImageSkia icon = gfx::CreateVectorIcon( | 756 gfx::ImageSkia icon = gfx::CreateVectorIcon( |
757 expanded ? kCaretUpIcon : kCaretDownIcon, gfx::kChromeIconGrey); | 757 expanded ? kCaretUpIcon : kCaretDownIcon, gfx::kChromeIconGrey); |
758 arrow_toggle_->SetImage(views::Button::STATE_NORMAL, &icon); | 758 arrow_toggle_->SetImage(views::Button::STATE_NORMAL, &icon); |
759 } | 759 } |
760 | 760 |
761 // static | 761 // static |
762 ExtensionInstallPrompt::ShowDialogCallback | 762 ExtensionInstallPrompt::ShowDialogCallback |
763 ExtensionInstallPrompt::GetViewsShowDialogCallback() { | 763 ExtensionInstallPrompt::GetViewsShowDialogCallback() { |
764 return base::Bind(&ShowExtensionInstallDialogImpl); | 764 return base::Bind(&ShowExtensionInstallDialogImpl); |
765 } | 765 } |
OLD | NEW |