| 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "base/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
| 12 #include "chrome/browser/extensions/api/chrome_device_permissions_prompt.h" | 12 #include "chrome/browser/extensions/api/chrome_device_permissions_prompt.h" |
| 13 #include "chrome/grit/generated_resources.h" | 13 #include "chrome/grit/generated_resources.h" |
| 14 #include "components/constrained_window/constrained_window_views.h" | 14 #include "components/constrained_window/constrained_window_views.h" |
| 15 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 15 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
| 17 #include "device/usb/usb_device.h" | 17 #include "device/usb/usb_device.h" |
| 18 #include "extensions/common/extension.h" | 18 #include "extensions/common/extension.h" |
| 19 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
| 20 #include "ui/base/models/table_model.h" | 20 #include "ui/base/models/table_model.h" |
| 21 #include "ui/base/models/table_model_observer.h" | 21 #include "ui/base/models/table_model_observer.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 web_modal::WebContentsModalDialogManager::FromWebContents(web_contents()); | 166 web_modal::WebContentsModalDialogManager::FromWebContents(web_contents()); |
| 167 if (manager) { | 167 if (manager) { |
| 168 constrained_window::ShowWebModalDialogViews( | 168 constrained_window::ShowWebModalDialogViews( |
| 169 new DevicePermissionsDialogView(prompt()), web_contents()); | 169 new DevicePermissionsDialogView(prompt()), web_contents()); |
| 170 } else { | 170 } else { |
| 171 base::ThreadTaskRunnerHandle::Get()->PostTask( | 171 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 172 FROM_HERE, | 172 FROM_HERE, |
| 173 base::Bind(&DevicePermissionsPrompt::Prompt::Dismissed, prompt())); | 173 base::Bind(&DevicePermissionsPrompt::Prompt::Dismissed, prompt())); |
| 174 } | 174 } |
| 175 } | 175 } |
| OLD | NEW |