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

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

Issue 8351028: Make chrome/utility not depend on content/common. Enforce with DEPS. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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 | Annotate | Revision Log
« no previous file with comments | « content/utility/utility_thread_impl.h ('k') | no next file » | 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/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/file_path.h" 9 #include "base/file_path.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
11 #include "content/common/child_process.h" 11 #include "content/common/child_process.h"
12 #include "content/common/child_process_messages.h"
12 #include "content/common/indexed_db_key.h" 13 #include "content/common/indexed_db_key.h"
13 #include "content/common/utility_messages.h" 14 #include "content/common/utility_messages.h"
14 #include "content/public/utility/content_utility_client.h" 15 #include "content/public/utility/content_utility_client.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa lue.h" 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa lue.h"
18 #include "webkit/glue/idb_bindings.h" 19 #include "webkit/glue/idb_bindings.h"
19 #include "webkit/glue/webkitplatformsupport_impl.h" 20 #include "webkit/glue/webkitplatformsupport_impl.h"
20 #include "webkit/plugins/npapi/plugin_list.h" 21 #include "webkit/plugins/npapi/plugin_list.h"
21 22
(...skipping 22 matching lines...) Expand all
44 45
45 bool UtilityThreadImpl::Send(IPC::Message* msg) { 46 bool UtilityThreadImpl::Send(IPC::Message* msg) {
46 return ChildThread::Send(msg); 47 return ChildThread::Send(msg);
47 } 48 }
48 49
49 void UtilityThreadImpl::ReleaseProcessIfNeeded() { 50 void UtilityThreadImpl::ReleaseProcessIfNeeded() {
50 if (!batch_mode_) 51 if (!batch_mode_)
51 ChildProcess::current()->ReleaseProcess(); 52 ChildProcess::current()->ReleaseProcess();
52 } 53 }
53 54
55 #if defined(OS_WIN)
56
57 void UtilityThreadImpl::PreCacheFont(const LOGFONT& log_font) {
58 Send(new ChildProcessHostMsg_PreCacheFont(log_font));
59 }
60
61 void UtilityThreadImpl::ReleaseCachedFonts() {
62 Send(new ChildProcessHostMsg_ReleaseCachedFonts());
63 }
64
65 #endif // OS_WIN
66
67
54 bool UtilityThreadImpl::OnControlMessageReceived(const IPC::Message& msg) { 68 bool UtilityThreadImpl::OnControlMessageReceived(const IPC::Message& msg) {
55 if (content::GetContentClient()->utility()->OnMessageReceived(msg)) 69 if (content::GetContentClient()->utility()->OnMessageReceived(msg))
56 return true; 70 return true;
57 71
58 bool handled = true; 72 bool handled = true;
59 IPC_BEGIN_MESSAGE_MAP(UtilityThreadImpl, msg) 73 IPC_BEGIN_MESSAGE_MAP(UtilityThreadImpl, msg)
60 IPC_MESSAGE_HANDLER(UtilityMsg_IDBKeysFromValuesAndKeyPath, 74 IPC_MESSAGE_HANDLER(UtilityMsg_IDBKeysFromValuesAndKeyPath,
61 OnIDBKeysFromValuesAndKeyPath) 75 OnIDBKeysFromValuesAndKeyPath)
62 IPC_MESSAGE_HANDLER(UtilityMsg_InjectIDBKey, OnInjectIDBKey) 76 IPC_MESSAGE_HANDLER(UtilityMsg_InjectIDBKey, OnInjectIDBKey)
63 IPC_MESSAGE_HANDLER(UtilityMsg_BatchMode_Started, OnBatchModeStarted) 77 IPC_MESSAGE_HANDLER(UtilityMsg_BatchMode_Started, OnBatchModeStarted)
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 const webkit::npapi::PluginGroup* group = plugin_groups[0]; 141 const webkit::npapi::PluginGroup* group = plugin_groups[0];
128 DCHECK_EQ(group->web_plugin_infos().size(), 1u); 142 DCHECK_EQ(group->web_plugin_infos().size(), 1u);
129 143
130 Send(new UtilityHostMsg_LoadedPlugin(group->web_plugin_infos().front())); 144 Send(new UtilityHostMsg_LoadedPlugin(group->web_plugin_infos().front()));
131 } 145 }
132 146
133 ReleaseProcessIfNeeded(); 147 ReleaseProcessIfNeeded();
134 } 148 }
135 #endif 149 #endif
136 150
OLDNEW
« no previous file with comments | « content/utility/utility_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698