| OLD | NEW |
| 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 "chrome/browser/ui/webui/help/version_updater_win.h" | 5 #include "chrome/browser/ui/webui/help/version_updater_win.h" |
| 6 | 6 |
| 7 #include "base/memory/weak_ptr.h" | 7 #include "base/memory/weak_ptr.h" |
| 8 #include "base/task_runner_util.h" | 8 #include "base/task_runner_util.h" |
| 9 #include "base/threading/sequenced_worker_pool.h" |
| 9 #include "base/win/win_util.h" | 10 #include "base/win/win_util.h" |
| 10 #include "base/win/windows_version.h" | 11 #include "base/win/windows_version.h" |
| 11 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
| 12 #include "chrome/browser/first_run/upgrade_util.h" | 13 #include "chrome/browser/first_run/upgrade_util.h" |
| 13 #include "chrome/grit/generated_resources.h" | 14 #include "chrome/grit/generated_resources.h" |
| 14 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
| 15 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
| 16 #include "ui/aura/window.h" | 17 #include "ui/aura/window.h" |
| 17 #include "ui/aura/window_tree_host.h" | 18 #include "ui/aura/window_tree_host.h" |
| 18 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // have been closed by the time the UAC prompt is needed. In this case, the | 141 // have been closed by the time the UAC prompt is needed. In this case, the |
| 141 // web contents may no longer be hosted in a window, leading either | 142 // web contents may no longer be hosted in a window, leading either |
| 142 // GetTopLevelNativeWindow or GetHost to return null. Passing nullptr to | 143 // GetTopLevelNativeWindow or GetHost to return null. Passing nullptr to |
| 143 // VersionUpdaterWin will then also cause the UAC prompt to appear in the task | 144 // VersionUpdaterWin will then also cause the UAC prompt to appear in the task |
| 144 // bar. | 145 // bar. |
| 145 gfx::NativeWindow window = web_contents->GetTopLevelNativeWindow(); | 146 gfx::NativeWindow window = web_contents->GetTopLevelNativeWindow(); |
| 146 aura::WindowTreeHost* window_tree_host = window ? window->GetHost() : nullptr; | 147 aura::WindowTreeHost* window_tree_host = window ? window->GetHost() : nullptr; |
| 147 return new VersionUpdaterWin( | 148 return new VersionUpdaterWin( |
| 148 window_tree_host ? window_tree_host->GetAcceleratedWidget() : nullptr); | 149 window_tree_host ? window_tree_host->GetAcceleratedWidget() : nullptr); |
| 149 } | 150 } |
| OLD | NEW |