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

Side by Side Diff: content/utility/utility_thread_impl.cc

Issue 63253002: Rename WebKit namespace to blink (part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
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 "content/utility/utility_thread_impl.h" 5 #include "content/utility/utility_thread_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 Init(); 42 Init();
43 } 43 }
44 44
45 UtilityThreadImpl::~UtilityThreadImpl() { 45 UtilityThreadImpl::~UtilityThreadImpl() {
46 } 46 }
47 47
48 void UtilityThreadImpl::Shutdown() { 48 void UtilityThreadImpl::Shutdown() {
49 ChildThread::Shutdown(); 49 ChildThread::Shutdown();
50 50
51 if (!single_process_) 51 if (!single_process_)
52 WebKit::shutdown(); 52 blink::shutdown();
53 } 53 }
54 54
55 bool UtilityThreadImpl::Send(IPC::Message* msg) { 55 bool UtilityThreadImpl::Send(IPC::Message* msg) {
56 return ChildThread::Send(msg); 56 return ChildThread::Send(msg);
57 } 57 }
58 58
59 void UtilityThreadImpl::ReleaseProcessIfNeeded() { 59 void UtilityThreadImpl::ReleaseProcessIfNeeded() {
60 if (batch_mode_) 60 if (batch_mode_)
61 return; 61 return;
62 62
(...skipping 22 matching lines...) Expand all
85 85
86 void UtilityThreadImpl::Init() { 86 void UtilityThreadImpl::Init() {
87 batch_mode_ = false; 87 batch_mode_ = false;
88 ChildProcess::current()->AddRefProcess(); 88 ChildProcess::current()->AddRefProcess();
89 if (!single_process_) { 89 if (!single_process_) {
90 // We can only initialize WebKit on one thread, and in single process mode 90 // We can only initialize WebKit on one thread, and in single process mode
91 // we run the utility thread on separate thread. This means that if any code 91 // we run the utility thread on separate thread. This means that if any code
92 // needs WebKit initialized in the utility process, they need to have 92 // needs WebKit initialized in the utility process, they need to have
93 // another path to support single process mode. 93 // another path to support single process mode.
94 webkit_platform_support_.reset(new WebKitPlatformSupportImpl); 94 webkit_platform_support_.reset(new WebKitPlatformSupportImpl);
95 WebKit::initialize(webkit_platform_support_.get()); 95 blink::initialize(webkit_platform_support_.get());
96 } 96 }
97 GetContentClient()->utility()->UtilityThreadStarted(); 97 GetContentClient()->utility()->UtilityThreadStarted();
98 } 98 }
99 99
100 bool UtilityThreadImpl::OnControlMessageReceived(const IPC::Message& msg) { 100 bool UtilityThreadImpl::OnControlMessageReceived(const IPC::Message& msg) {
101 if (GetContentClient()->utility()->OnMessageReceived(msg)) 101 if (GetContentClient()->utility()->OnMessageReceived(msg))
102 return true; 102 return true;
103 103
104 bool handled = true; 104 bool handled = true;
105 IPC_BEGIN_MESSAGE_MAP(UtilityThreadImpl, msg) 105 IPC_BEGIN_MESSAGE_MAP(UtilityThreadImpl, msg)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i])); 137 Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i]));
138 else 138 else
139 Send(new UtilityHostMsg_LoadedPlugin(i, plugin)); 139 Send(new UtilityHostMsg_LoadedPlugin(i, plugin));
140 } 140 }
141 141
142 ReleaseProcessIfNeeded(); 142 ReleaseProcessIfNeeded();
143 } 143 }
144 #endif 144 #endif
145 145
146 } // namespace content 146 } // namespace content
OLDNEW
« no previous file with comments | « content/test/weburl_loader_mock_factory.cc ('k') | content/worker/shared_worker_devtools_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698