| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 private: | 109 private: |
| 110 // views::DialogDelegateView: | 110 // views::DialogDelegateView: |
| 111 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; | 111 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; |
| 112 virtual int GetDefaultDialogButton() const OVERRIDE; | 112 virtual int GetDefaultDialogButton() const OVERRIDE; |
| 113 virtual bool Cancel() OVERRIDE; | 113 virtual bool Cancel() OVERRIDE; |
| 114 virtual bool Accept() OVERRIDE; | 114 virtual bool Accept() OVERRIDE; |
| 115 | 115 |
| 116 // views::WidgetDelegate: | 116 // views::WidgetDelegate: |
| 117 virtual ui::ModalType GetModalType() const OVERRIDE; | 117 virtual ui::ModalType GetModalType() const OVERRIDE; |
| 118 virtual string16 GetWindowTitle() const OVERRIDE; | 118 virtual string16 GetWindowTitle() const OVERRIDE; |
| 119 virtual views::View* GetContentsView() OVERRIDE; | |
| 120 | 119 |
| 121 // views::LinkListener: | 120 // views::LinkListener: |
| 122 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | 121 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; |
| 123 | 122 |
| 124 bool is_inline_install() const { | 123 bool is_inline_install() const { |
| 125 return prompt_.type() == ExtensionInstallPrompt::INLINE_INSTALL_PROMPT; | 124 return prompt_.type() == ExtensionInstallPrompt::INLINE_INSTALL_PROMPT; |
| 126 } | 125 } |
| 127 | 126 |
| 128 bool is_bundle_install() const { | 127 bool is_bundle_install() const { |
| 129 return prompt_.type() == ExtensionInstallPrompt::BUNDLE_INSTALL_PROMPT; | 128 return prompt_.type() == ExtensionInstallPrompt::BUNDLE_INSTALL_PROMPT; |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 } | 575 } |
| 577 | 576 |
| 578 ui::ModalType ExtensionInstallDialogView::GetModalType() const { | 577 ui::ModalType ExtensionInstallDialogView::GetModalType() const { |
| 579 return ui::MODAL_TYPE_WINDOW; | 578 return ui::MODAL_TYPE_WINDOW; |
| 580 } | 579 } |
| 581 | 580 |
| 582 string16 ExtensionInstallDialogView::GetWindowTitle() const { | 581 string16 ExtensionInstallDialogView::GetWindowTitle() const { |
| 583 return prompt_.GetDialogTitle(); | 582 return prompt_.GetDialogTitle(); |
| 584 } | 583 } |
| 585 | 584 |
| 586 views::View* ExtensionInstallDialogView::GetContentsView() { | |
| 587 return this; | |
| 588 } | |
| 589 | |
| 590 void ExtensionInstallDialogView::LinkClicked(views::Link* source, | 585 void ExtensionInstallDialogView::LinkClicked(views::Link* source, |
| 591 int event_flags) { | 586 int event_flags) { |
| 592 GURL store_url(extension_urls::GetWebstoreItemDetailURLPrefix() + | 587 GURL store_url(extension_urls::GetWebstoreItemDetailURLPrefix() + |
| 593 prompt_.extension()->id()); | 588 prompt_.extension()->id()); |
| 594 OpenURLParams params( | 589 OpenURLParams params( |
| 595 store_url, Referrer(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, | 590 store_url, Referrer(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, |
| 596 false); | 591 false); |
| 597 navigator_->OpenURL(params); | 592 navigator_->OpenURL(params); |
| 598 GetWidget()->Close(); | 593 GetWidget()->Close(); |
| 599 } | 594 } |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 rotate.Translate(-arrow_view_->width() / 2.0, | 724 rotate.Translate(-arrow_view_->width() / 2.0, |
| 730 -arrow_view_->height() / 2.0); | 725 -arrow_view_->height() / 2.0); |
| 731 } | 726 } |
| 732 arrow_view_->SetTransform(rotate); | 727 arrow_view_->SetTransform(rotate); |
| 733 } | 728 } |
| 734 } | 729 } |
| 735 | 730 |
| 736 void IssueAdviceView::ChildPreferredSizeChanged(views::View* child) { | 731 void IssueAdviceView::ChildPreferredSizeChanged(views::View* child) { |
| 737 owner_->SizeToContents(); | 732 owner_->SizeToContents(); |
| 738 } | 733 } |
| OLD | NEW |