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

Side by Side Diff: content/browser/in_process_webkit/webkit_thread.cc

Issue 8776007: Start/stop WebKitThread from BrowserMainLoop like other BrowserThreads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. Created 9 years 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 "content/browser/in_process_webkit/webkit_thread.h" 5 #include "content/browser/in_process_webkit/webkit_thread.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/browser/in_process_webkit/browser_webkitplatformsupport_impl.h " 8 #include "content/browser/in_process_webkit/browser_webkitplatformsupport_impl.h "
9 #include "content/public/common/content_switches.h" 9 #include "content/public/common/content_switches.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
12 #include "webkit/glue/webkit_glue.h" 12 #include "webkit/glue/webkit_glue.h"
13 13
14 using content::BrowserThread; 14 namespace content {
15 15
16 WebKitThread::WebKitThread() { 16 WebKitThread::WebKitThread() {
17 } 17 }
18 18
19 // This happens on the UI thread after the IO thread has been shut down. 19 // This happens on the UI thread after the IO thread has been shut down.
20 WebKitThread::~WebKitThread() { 20 WebKitThread::~WebKitThread() {
21 // We can't just check CurrentlyOn(BrowserThread::UI) because in unit tests, 21 // We can't just check CurrentlyOn(BrowserThread::UI) because in unit tests,
22 // MessageLoop::Current is sometimes NULL and other times valid and there's 22 // MessageLoop::Current is sometimes NULL and other times valid and there's
23 // no BrowserThread object. Can't check that CurrentlyOn is not IO since 23 // no BrowserThread object. Can't check that CurrentlyOn is not IO since
24 // some unit tests set that BrowserThread for other checks. 24 // some unit tests set that BrowserThread for other checks.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 WebKit::WebSecurityOrigin::create(GURL("http://chromium.org")); 59 WebKit::WebSecurityOrigin::create(GURL("http://chromium.org"));
60 60
61 // If possible, post initialization tasks to this thread (rather than doing 61 // If possible, post initialization tasks to this thread (rather than doing
62 // them now) so we don't block the UI thread any longer than we have to. 62 // them now) so we don't block the UI thread any longer than we have to.
63 } 63 }
64 64
65 void WebKitThread::InternalWebKitThread::CleanUp() { 65 void WebKitThread::InternalWebKitThread::CleanUp() {
66 DCHECK(webkit_platform_support_.get()); 66 DCHECK(webkit_platform_support_.get());
67 WebKit::shutdown(); 67 WebKit::shutdown();
68 } 68 }
69
70 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/in_process_webkit/webkit_thread.h ('k') | content/browser/in_process_webkit/webkit_thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698