Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: chrome/browser/ui/views/extensions/extension_install_dialog_view.cc

Issue 16374006: Place browser-modal dialogs like web-contents-modal dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert changes to c/b/chromeos files for now. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "chrome/browser/extensions/bundle_installer.h" 13 #include "chrome/browser/extensions/bundle_installer.h"
14 #include "chrome/browser/extensions/extension_install_prompt.h" 14 #include "chrome/browser/extensions/extension_install_prompt.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/ui/views/constrained_window_views.h"
16 #include "chrome/common/chrome_switches.h" 17 #include "chrome/common/chrome_switches.h"
17 #include "chrome/common/extensions/extension.h" 18 #include "chrome/common/extensions/extension.h"
18 #include "chrome/installer/util/browser_distribution.h" 19 #include "chrome/installer/util/browser_distribution.h"
19 #include "content/public/browser/page_navigator.h" 20 #include "content/public/browser/page_navigator.h"
20 #include "content/public/browser/web_contents.h" 21 #include "content/public/browser/web_contents.h"
21 #include "grit/chromium_strings.h" 22 #include "grit/chromium_strings.h"
22 #include "grit/generated_resources.h" 23 #include "grit/generated_resources.h"
23 #include "grit/google_chrome_strings.h" 24 #include "grit/google_chrome_strings.h"
24 #include "grit/theme_resources.h" 25 #include "grit/theme_resources.h"
25 #include "ui/base/animation/animation_delegate.h" 26 #include "ui/base/animation/animation_delegate.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 ui::SlideAnimation slide_animation_; 179 ui::SlideAnimation slide_animation_;
179 180
180 DISALLOW_COPY_AND_ASSIGN(IssueAdviceView); 181 DISALLOW_COPY_AND_ASSIGN(IssueAdviceView);
181 }; 182 };
182 183
183 void ShowExtensionInstallDialogImpl( 184 void ShowExtensionInstallDialogImpl(
184 const ExtensionInstallPrompt::ShowParams& show_params, 185 const ExtensionInstallPrompt::ShowParams& show_params,
185 ExtensionInstallPrompt::Delegate* delegate, 186 ExtensionInstallPrompt::Delegate* delegate,
186 const ExtensionInstallPrompt::Prompt& prompt) { 187 const ExtensionInstallPrompt::Prompt& prompt) {
187 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 188 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
188 views::DialogDelegate::CreateDialogWidget( 189 CreateBrowserModalDialogViews(
189 new ExtensionInstallDialogView(show_params.navigator, delegate, prompt), 190 new ExtensionInstallDialogView(show_params.navigator, delegate, prompt),
190 NULL, show_params.parent_window)->Show(); 191 show_params.parent_window)->Show();
191 } 192 }
192 193
193 } // namespace 194 } // namespace
194 195
195 ExtensionInstallDialogView::ExtensionInstallDialogView( 196 ExtensionInstallDialogView::ExtensionInstallDialogView(
196 content::PageNavigator* navigator, 197 content::PageNavigator* navigator,
197 ExtensionInstallPrompt::Delegate* delegate, 198 ExtensionInstallPrompt::Delegate* delegate,
198 const ExtensionInstallPrompt::Prompt& prompt) 199 const ExtensionInstallPrompt::Prompt& prompt)
199 : navigator_(navigator), 200 : navigator_(navigator),
200 delegate_(delegate), 201 delegate_(delegate),
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 rotate.Translate(-arrow_view_->width() / 2.0, 632 rotate.Translate(-arrow_view_->width() / 2.0,
632 -arrow_view_->height() / 2.0); 633 -arrow_view_->height() / 2.0);
633 } 634 }
634 arrow_view_->SetTransform(rotate); 635 arrow_view_->SetTransform(rotate);
635 } 636 }
636 } 637 }
637 638
638 void IssueAdviceView::ChildPreferredSizeChanged(views::View* child) { 639 void IssueAdviceView::ChildPreferredSizeChanged(views::View* child) {
639 owner_->SizeToContents(); 640 owner_->SizeToContents();
640 } 641 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698