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 "chrome/browser/ui/views/extensions/extension_dialog.h" | 5 #include "chrome/browser/ui/views/extensions/extension_dialog.h" |
6 | 6 |
7 #include "chrome/browser/extensions/extension_host.h" | 7 #include "chrome/browser/extensions/extension_host.h" |
8 #include "chrome/browser/extensions/extension_process_manager.h" | 8 #include "chrome/browser/extensions/extension_process_manager.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 namespace { | 26 namespace { |
27 | 27 |
28 views::Widget* CreateWindow(gfx::NativeWindow parent, | 28 views::Widget* CreateWindow(gfx::NativeWindow parent, |
29 views::WidgetDelegate* delegate) { | 29 views::WidgetDelegate* delegate) { |
30 #if defined(OS_CHROMEOS) && defined(TOOLKIT_USES_GTK) | 30 #if defined(OS_CHROMEOS) && defined(TOOLKIT_USES_GTK) |
31 // TODO(msw): revert to BubbleWindow for all ChromeOS cases when CL | 31 // TODO(msw): revert to BubbleWindow for all ChromeOS cases when CL |
32 // for crbug.com/98322 is landed. | 32 // for crbug.com/98322 is landed. |
33 // On Chrome OS we need to override the style to suppress padding around | 33 // On Chrome OS we need to override the style to suppress padding around |
34 // the borders. | 34 // the borders. |
35 return chromeos::BubbleWindow::Create(parent, | 35 return chromeos::BubbleWindow::Create(parent, |
36 chromeos::STYLE_FLUSH, delegate); | 36 STYLE_FLUSH, delegate); |
37 #else | 37 #else |
38 return browser::CreateViewsWindow(parent, delegate); | 38 return browser::CreateViewsWindow(parent, delegate); |
39 #endif | 39 #endif |
40 } | 40 } |
41 | 41 |
42 } // namespace | 42 } // namespace |
43 | 43 |
44 ExtensionDialog::ExtensionDialog(ExtensionHost* host, | 44 ExtensionDialog::ExtensionDialog(ExtensionHost* host, |
45 ExtensionDialogObserver* observer) | 45 ExtensionDialogObserver* observer) |
46 : window_(NULL), | 46 : window_(NULL), |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 // If we aren't the host of the popup, then disregard the notification. | 160 // If we aren't the host of the popup, then disregard the notification. |
161 if (content::Details<ExtensionHost>(host()) != details) | 161 if (content::Details<ExtensionHost>(host()) != details) |
162 return; | 162 return; |
163 Close(); | 163 Close(); |
164 break; | 164 break; |
165 default: | 165 default: |
166 NOTREACHED() << L"Received unexpected notification"; | 166 NOTREACHED() << L"Received unexpected notification"; |
167 break; | 167 break; |
168 } | 168 } |
169 } | 169 } |
OLD | NEW |