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

Side by Side Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 10815073: Refactoring of new IPC-only pepper implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months 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/ppapi_plugin/ppapi_thread.h ('k') | content/public/browser/browser_ppapi_host.h » ('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) 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/ppapi_plugin/ppapi_thread.h" 5 #include "content/ppapi_plugin/ppapi_thread.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 return &globally_seen_instance_ids_; 161 return &globally_seen_instance_ids_;
162 } 162 }
163 163
164 bool PpapiThread::SendToBrowser(IPC::Message* msg) { 164 bool PpapiThread::SendToBrowser(IPC::Message* msg) {
165 if (MessageLoop::current() == message_loop()) 165 if (MessageLoop::current() == message_loop())
166 return ChildThread::Send(msg); 166 return ChildThread::Send(msg);
167 167
168 return sync_message_filter()->Send(msg); 168 return sync_message_filter()->Send(msg);
169 } 169 }
170 170
171 IPC::Sender* PpapiThread::GetBrowserSender() {
172 return this;
173 }
174
171 std::string PpapiThread::GetUILanguage() { 175 std::string PpapiThread::GetUILanguage() {
172 CommandLine* command_line = CommandLine::ForCurrentProcess(); 176 CommandLine* command_line = CommandLine::ForCurrentProcess();
173 return command_line->GetSwitchValueASCII(switches::kLang); 177 return command_line->GetSwitchValueASCII(switches::kLang);
174 } 178 }
175 179
176 void PpapiThread::PreCacheFont(const void* logfontw) { 180 void PpapiThread::PreCacheFont(const void* logfontw) {
177 #if defined(OS_WIN) 181 #if defined(OS_WIN)
178 Send(new ChildProcessHostMsg_PreCacheFont( 182 Send(new ChildProcessHostMsg_PreCacheFont(
179 *static_cast<const LOGFONTW*>(logfontw))); 183 *static_cast<const LOGFONTW*>(logfontw)));
180 #endif 184 #endif
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 ppapi::proxy::PluginGlobals::Get()->set_plugin_name( 380 ppapi::proxy::PluginGlobals::Get()->set_plugin_name(
377 path.BaseName().AsUTF8Unsafe()); 381 path.BaseName().AsUTF8Unsafe());
378 382
379 // plugin() is NULL when in-process. Which is fine, because this is 383 // plugin() is NULL when in-process. Which is fine, because this is
380 // just a hook for setting the process name. 384 // just a hook for setting the process name.
381 if (content::GetContentClient()->plugin()) { 385 if (content::GetContentClient()->plugin()) {
382 content::GetContentClient()->plugin()->PluginProcessStarted( 386 content::GetContentClient()->plugin()->PluginProcessStarted(
383 path.BaseName().RemoveExtension().LossyDisplayName()); 387 path.BaseName().RemoveExtension().LossyDisplayName());
384 } 388 }
385 } 389 }
OLDNEW
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.h ('k') | content/public/browser/browser_ppapi_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698