| Index: chrome/browser/ui/views/extensions/extension_dialog.cc
|
| diff --git a/chrome/browser/ui/views/extensions/extension_dialog.cc b/chrome/browser/ui/views/extensions/extension_dialog.cc
|
| index b73427b14f7043608f3f54709b665295f38fda97..c1128494cb16e6997bf82ebfbf6b1a5c5bd787d6 100644
|
| --- a/chrome/browser/ui/views/extensions/extension_dialog.cc
|
| +++ b/chrome/browser/ui/views/extensions/extension_dialog.cc
|
| @@ -31,6 +31,7 @@ ExtensionDialog::ExtensionDialog(extensions::ExtensionHost* host,
|
| ExtensionDialogObserver* observer)
|
| : window_(NULL),
|
| extension_host_(host),
|
| + view_(static_cast<ExtensionViewViews*>(host->GetExtensionView())),
|
| observer_(observer) {
|
| AddRef(); // Balanced in DeleteDelegate();
|
|
|
| @@ -103,9 +104,9 @@ ExtensionDialog* ExtensionDialog::ShowInternal(
|
|
|
| // Show a white background while the extension loads. This is prettier than
|
| // flashing a black unfilled window frame.
|
| - host->view()->set_background(
|
| + view_->set_background(
|
| views::Background::CreateSolidBackground(0xFF, 0xFF, 0xFF));
|
| - host->view()->SetVisible(true);
|
| + view_->SetVisible(true);
|
|
|
| // Ensure the DOM JavaScript can respond immediately to keyboard shortcuts.
|
| host->host_contents()->Focus();
|
| @@ -211,11 +212,11 @@ void ExtensionDialog::MaybeFocusRenderView() {
|
|
|
| bool ExtensionDialog::CanResize() const {
|
| // Can resize only if minimum contents size set.
|
| - return extension_host_->view()->GetPreferredSize() != gfx::Size();
|
| + return view_->GetPreferredSize() != gfx::Size();
|
| }
|
|
|
| void ExtensionDialog::SetMinimumContentsSize(int width, int height) {
|
| - extension_host_->view()->SetPreferredSize(gfx::Size(width, height));
|
| + view_->SetPreferredSize(gfx::Size(width, height));
|
| }
|
|
|
| ui::ModalType ExtensionDialog::GetModalType() const {
|
| @@ -241,15 +242,15 @@ void ExtensionDialog::DeleteDelegate() {
|
| }
|
|
|
| views::Widget* ExtensionDialog::GetWidget() {
|
| - return extension_host_->view()->GetWidget();
|
| + return view_->GetWidget();
|
| }
|
|
|
| const views::Widget* ExtensionDialog::GetWidget() const {
|
| - return extension_host_->view()->GetWidget();
|
| + return view_->GetWidget();
|
| }
|
|
|
| views::View* ExtensionDialog::GetContentsView() {
|
| - return extension_host_->view();
|
| + return view_;
|
| }
|
|
|
| /////////////////////////////////////////////////////////////////////////////
|
| @@ -262,7 +263,7 @@ void ExtensionDialog::Observe(int type,
|
| case chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING:
|
| // Avoid potential overdraw by removing the temporary background after
|
| // the extension finishes loading.
|
| - extension_host_->view()->set_background(NULL);
|
| + view_->set_background(NULL);
|
| // The render view is created during the LoadURL(), so we should
|
| // set the focus to the view if nobody else takes the focus.
|
| if (content::Details<extensions::ExtensionHost>(host()) == details)
|
|
|