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

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

Issue 8340028: Salient parts of http://codereview.chromium.org/8392042/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « content/browser/in_process_webkit/webkit_thread.h ('k') | content/browser/mach_broker_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 19 matching lines...) Expand all
30 // TODO(jorlow): We need a better story for single process mode. 30 // TODO(jorlow): We need a better story for single process mode.
31 return; 31 return;
32 } 32 }
33 33
34 webkit_thread_.reset(new InternalWebKitThread); 34 webkit_thread_.reset(new InternalWebKitThread);
35 bool started = webkit_thread_->Start(); 35 bool started = webkit_thread_->Start();
36 DCHECK(started); 36 DCHECK(started);
37 } 37 }
38 38
39 WebKitThread::InternalWebKitThread::InternalWebKitThread() 39 WebKitThread::InternalWebKitThread::InternalWebKitThread()
40 : BrowserThread(BrowserThread::WEBKIT) { 40 : content::BrowserThreadImpl(BrowserThread::WEBKIT) {
41 } 41 }
42 42
43 WebKitThread::InternalWebKitThread::~InternalWebKitThread() { 43 WebKitThread::InternalWebKitThread::~InternalWebKitThread() {
44 Stop(); 44 Stop();
45 } 45 }
46 46
47 void WebKitThread::InternalWebKitThread::Init() { 47 void WebKitThread::InternalWebKitThread::Init() {
48 DCHECK(!webkit_platform_support_.get()); 48 DCHECK(!webkit_platform_support_.get());
49 webkit_platform_support_.reset(new BrowserWebKitPlatformSupportImpl); 49 webkit_platform_support_.reset(new BrowserWebKitPlatformSupportImpl);
50 WebKit::initializeWithoutV8(webkit_platform_support_.get()); 50 WebKit::initializeWithoutV8(webkit_platform_support_.get());
51 webkit_glue::EnableWebCoreLogChannels( 51 webkit_glue::EnableWebCoreLogChannels(
52 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 52 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
53 switches::kWebCoreLogChannels)); 53 switches::kWebCoreLogChannels));
54 // Exercise WebSecurityOrigin to get its underlying statics initialized. 54 // Exercise WebSecurityOrigin to get its underlying statics initialized.
55 // TODO(michaeln): remove this when the following is landed. 55 // TODO(michaeln): remove this when the following is landed.
56 // https://bugs.webkit.org/show_bug.cgi?id=61145 56 // https://bugs.webkit.org/show_bug.cgi?id=61145
57 WebKit::WebSecurityOrigin::create(GURL("http://chromium.org")); 57 WebKit::WebSecurityOrigin::create(GURL("http://chromium.org"));
58 58
59 // If possible, post initialization tasks to this thread (rather than doing 59 // If possible, post initialization tasks to this thread (rather than doing
60 // them now) so we don't block the UI thread any longer than we have to. 60 // them now) so we don't block the UI thread any longer than we have to.
61 } 61 }
62 62
63 void WebKitThread::InternalWebKitThread::CleanUp() { 63 void WebKitThread::InternalWebKitThread::CleanUp() {
64 DCHECK(webkit_platform_support_.get()); 64 DCHECK(webkit_platform_support_.get());
65 WebKit::shutdown(); 65 WebKit::shutdown();
66 } 66 }
OLDNEW
« no previous file with comments | « content/browser/in_process_webkit/webkit_thread.h ('k') | content/browser/mach_broker_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698