| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |