Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: chrome/browser/browser_process_impl.cc

Issue 7054005: Fix gpu acceleration with --in-process-gpu (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: cleanup Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #include "chrome/common/extensions/extension_resource.h" 63 #include "chrome/common/extensions/extension_resource.h"
64 #include "chrome/common/json_pref_store.h" 64 #include "chrome/common/json_pref_store.h"
65 #include "chrome/common/pref_names.h" 65 #include "chrome/common/pref_names.h"
66 #include "chrome/common/switch_utils.h" 66 #include "chrome/common/switch_utils.h"
67 #include "chrome/common/url_constants.h" 67 #include "chrome/common/url_constants.h"
68 #include "chrome/installer/util/google_update_constants.h" 68 #include "chrome/installer/util/google_update_constants.h"
69 #include "content/browser/browser_child_process_host.h" 69 #include "content/browser/browser_child_process_host.h"
70 #include "content/browser/browser_thread.h" 70 #include "content/browser/browser_thread.h"
71 #include "content/browser/child_process_security_policy.h" 71 #include "content/browser/child_process_security_policy.h"
72 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 72 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
73 #include "content/browser/gpu/gpu_thread_host.h"
73 #include "content/browser/plugin_service.h" 74 #include "content/browser/plugin_service.h"
74 #include "content/browser/renderer_host/render_process_host.h" 75 #include "content/browser/renderer_host/render_process_host.h"
75 #include "content/browser/renderer_host/resource_dispatcher_host.h" 76 #include "content/browser/renderer_host/resource_dispatcher_host.h"
76 #include "content/common/notification_service.h" 77 #include "content/common/notification_service.h"
77 #include "ipc/ipc_logging.h" 78 #include "ipc/ipc_logging.h"
78 #include "net/url_request/url_request_context_getter.h" 79 #include "net/url_request/url_request_context_getter.h"
79 #include "ui/base/clipboard/clipboard.h" 80 #include "ui/base/clipboard/clipboard.h"
80 #include "ui/base/l10n/l10n_util.h" 81 #include "ui/base/l10n/l10n_util.h"
81 #include "webkit/database/database_tracker.h" 82 #include "webkit/database/database_tracker.h"
82 #include "webkit/plugins/npapi/plugin_list.h" 83 #include "webkit/plugins/npapi/plugin_list.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 browser_policy_connector_.reset(); 227 browser_policy_connector_.reset();
227 228
228 #if defined(USE_X11) 229 #if defined(USE_X11)
229 // The IO thread must outlive the BACKGROUND_X11 thread. 230 // The IO thread must outlive the BACKGROUND_X11 thread.
230 background_x11_thread_.reset(); 231 background_x11_thread_.reset();
231 #endif 232 #endif
232 233
233 // Wait for removing plugin data to finish before shutting down the IO thread. 234 // Wait for removing plugin data to finish before shutting down the IO thread.
234 WaitForPluginDataRemoverToFinish(); 235 WaitForPluginDataRemoverToFinish();
235 236
237 // Make sure the singleton gets destroyed. This cannot happen too late because
238 // of necessary cleanup.
239 GpuThreadHost::Destroy();
240
236 // Destroying the GpuProcessHostUIShims on the UI thread posts a task to 241 // Destroying the GpuProcessHostUIShims on the UI thread posts a task to
237 // delete related objects on the GPU thread. This must be done before 242 // delete related objects on the GPU thread. This must be done before
238 // stopping the GPU thread. The GPU thread will close IPC channels to renderer 243 // stopping the GPU thread. The GPU thread will close IPC channels to renderer
239 // processes so this has to happen before stopping the IO thread. 244 // processes so this has to happen before stopping the IO thread.
240 GpuProcessHostUIShim::DestroyAll(); 245 GpuProcessHostUIShim::DestroyAll();
241 gpu_thread_.reset(); 246 gpu_thread_.reset();
242 247
243 // Need to stop io_thread_ before resource_dispatcher_host_, since 248 // Need to stop io_thread_ before resource_dispatcher_host_, since
244 // io_thread_ may still deref ResourceDispatcherHost and handle resource 249 // io_thread_ may still deref ResourceDispatcherHost and handle resource
245 // request before going away. 250 // request before going away.
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 } 1126 }
1122 1127
1123 void BrowserProcessImpl::OnAutoupdateTimer() { 1128 void BrowserProcessImpl::OnAutoupdateTimer() {
1124 if (CanAutorestartForUpdate()) { 1129 if (CanAutorestartForUpdate()) {
1125 DLOG(WARNING) << "Detected update. Restarting browser."; 1130 DLOG(WARNING) << "Detected update. Restarting browser.";
1126 RestartPersistentInstance(); 1131 RestartPersistentInstance();
1127 } 1132 }
1128 } 1133 }
1129 1134
1130 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1135 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698