| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/device_permissions_dialog_view.h" | 5 #include "chrome/browser/ui/views/extensions/device_permissions_dialog_view.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/extensions/api/chrome_device_permissions_prompt.h" | 8 #include "chrome/browser/extensions/api/chrome_device_permissions_prompt.h" |
| 9 #include "chrome/browser/ui/views/constrained_window_views.h" | |
| 10 #include "chrome/grit/generated_resources.h" | 9 #include "chrome/grit/generated_resources.h" |
| 10 #include "components/constrained_window/constrained_window_views.h" |
| 11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
| 12 #include "device/usb/usb_device.h" | 12 #include "device/usb/usb_device.h" |
| 13 #include "extensions/common/extension.h" | 13 #include "extensions/common/extension.h" |
| 14 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
| 15 #include "ui/base/models/table_model.h" | 15 #include "ui/base/models/table_model.h" |
| 16 #include "ui/base/models/table_model_observer.h" | 16 #include "ui/base/models/table_model_observer.h" |
| 17 #include "ui/views/controls/label.h" | 17 #include "ui/views/controls/label.h" |
| 18 #include "ui/views/controls/table/table_view.h" | 18 #include "ui/views/controls/table/table_view.h" |
| 19 #include "ui/views/layout/box_layout.h" | 19 #include "ui/views/layout/box_layout.h" |
| 20 #include "ui/views/layout/layout_constants.h" | 20 #include "ui/views/layout/layout_constants.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 gfx::Size DevicePermissionsDialogView::GetPreferredSize() const { | 160 gfx::Size DevicePermissionsDialogView::GetPreferredSize() const { |
| 161 return gfx::Size(500, 250); | 161 return gfx::Size(500, 250); |
| 162 } | 162 } |
| 163 | 163 |
| 164 void ChromeDevicePermissionsPrompt::ShowDialog() { | 164 void ChromeDevicePermissionsPrompt::ShowDialog() { |
| 165 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 165 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 166 ShowWebModalDialogViews(new DevicePermissionsDialogView(delegate(), prompt()), | 166 ShowWebModalDialogViews(new DevicePermissionsDialogView(delegate(), prompt()), |
| 167 web_contents()); | 167 web_contents()); |
| 168 } | 168 } |
| OLD | NEW |