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

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
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 return &globally_seen_instance_ids_; 159 return &globally_seen_instance_ids_;
160 } 160 }
161 161
162 bool PpapiThread::SendToBrowser(IPC::Message* msg) { 162 bool PpapiThread::SendToBrowser(IPC::Message* msg) {
163 if (MessageLoop::current() == message_loop()) 163 if (MessageLoop::current() == message_loop())
164 return ChildThread::Send(msg); 164 return ChildThread::Send(msg);
165 165
166 return sync_message_filter()->Send(msg); 166 return sync_message_filter()->Send(msg);
167 } 167 }
168 168
169 IPC::Sender* PpapiThread::GetBrowserSender() {
170 return this;
171 }
172
169 std::string PpapiThread::GetUILanguage() { 173 std::string PpapiThread::GetUILanguage() {
170 CommandLine* command_line = CommandLine::ForCurrentProcess(); 174 CommandLine* command_line = CommandLine::ForCurrentProcess();
171 return command_line->GetSwitchValueASCII(switches::kLang); 175 return command_line->GetSwitchValueASCII(switches::kLang);
172 } 176 }
173 177
174 void PpapiThread::PreCacheFont(const void* logfontw) { 178 void PpapiThread::PreCacheFont(const void* logfontw) {
175 #if defined(OS_WIN) 179 #if defined(OS_WIN)
176 Send(new ChildProcessHostMsg_PreCacheFont( 180 Send(new ChildProcessHostMsg_PreCacheFont(
177 *static_cast<const LOGFONTW*>(logfontw))); 181 *static_cast<const LOGFONTW*>(logfontw)));
178 #endif 182 #endif
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 ppapi::proxy::PluginGlobals::Get()->set_plugin_name( 378 ppapi::proxy::PluginGlobals::Get()->set_plugin_name(
375 path.BaseName().AsUTF8Unsafe()); 379 path.BaseName().AsUTF8Unsafe());
376 380
377 // plugin() is NULL when in-process. Which is fine, because this is 381 // plugin() is NULL when in-process. Which is fine, because this is
378 // just a hook for setting the process name. 382 // just a hook for setting the process name.
379 if (content::GetContentClient()->plugin()) { 383 if (content::GetContentClient()->plugin()) {
380 content::GetContentClient()->plugin()->PluginProcessStarted( 384 content::GetContentClient()->plugin()->PluginProcessStarted(
381 path.BaseName().RemoveExtension().LossyDisplayName()); 385 path.BaseName().RemoveExtension().LossyDisplayName());
382 } 386 }
383 } 387 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698