OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/extensions/extension_install_dialog.h" | 9 #include "chrome/browser/extensions/extension_install_dialog.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/ui/browser_list.h" | 11 #include "chrome/browser/ui/browser_list.h" |
12 #include "chrome/browser/ui/browser_window.h" | 12 #include "chrome/browser/ui/browser_window.h" |
| 13 #include "chrome/browser/ui/dialog_style.h" |
13 #include "chrome/browser/ui/views/window.h" | 14 #include "chrome/browser/ui/views/window.h" |
14 #include "chrome/common/extensions/extension.h" | 15 #include "chrome/common/extensions/extension.h" |
15 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
16 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
17 #include "ui/base/resource/resource_bundle.h" | 18 #include "ui/base/resource/resource_bundle.h" |
18 #include "ui/views/layout/box_layout.h" | 19 #include "ui/views/layout/box_layout.h" |
19 #include "ui/views/layout/grid_layout.h" | 20 #include "ui/views/layout/grid_layout.h" |
20 #include "ui/views/layout/layout_constants.h" | 21 #include "ui/views/layout/layout_constants.h" |
21 #include "ui/views/window/dialog_delegate.h" | 22 #include "ui/views/window/dialog_delegate.h" |
22 #include "views/border.h" | 23 #include "views/border.h" |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 BrowserWindow* browser_window = browser->window(); | 324 BrowserWindow* browser_window = browser->window(); |
324 if (!browser_window) { | 325 if (!browser_window) { |
325 delegate->InstallUIAbort(false); | 326 delegate->InstallUIAbort(false); |
326 return; | 327 return; |
327 } | 328 } |
328 | 329 |
329 ExtensionInstallDialogView* dialog = new ExtensionInstallDialogView( | 330 ExtensionInstallDialogView* dialog = new ExtensionInstallDialogView( |
330 delegate, extension, icon, prompt); | 331 delegate, extension, icon, prompt); |
331 | 332 |
332 views::Widget* window = browser::CreateViewsWindow( | 333 views::Widget* window = browser::CreateViewsWindow( |
333 browser_window->GetNativeHandle(), dialog); | 334 browser_window->GetNativeHandle(), dialog, STYLE_GENERIC); |
334 | 335 |
335 window->Show(); | 336 window->Show(); |
336 } | 337 } |
OLD | NEW |