OLD | NEW |
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/cpu.h" | 10 #include "base/cpu.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 228 |
229 IPC::Sender* PpapiThread::GetBrowserSender() { | 229 IPC::Sender* PpapiThread::GetBrowserSender() { |
230 return this; | 230 return this; |
231 } | 231 } |
232 | 232 |
233 std::string PpapiThread::GetUILanguage() { | 233 std::string PpapiThread::GetUILanguage() { |
234 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 234 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
235 return command_line->GetSwitchValueASCII(switches::kLang); | 235 return command_line->GetSwitchValueASCII(switches::kLang); |
236 } | 236 } |
237 | 237 |
238 void PpapiThread::PreCacheFont(const void* logfontw) { | 238 void PpapiThread::PreCacheFontForFlash(const void* logfontw) { |
239 #if defined(OS_WIN) | 239 #if defined(OS_WIN) |
240 ChildThreadImpl::PreCacheFont(*static_cast<const LOGFONTW*>(logfontw)); | 240 ChildThreadImpl::PreCacheFont(*static_cast<const LOGFONTW*>(logfontw)); |
241 #endif | 241 #endif |
242 } | 242 } |
243 | 243 |
244 void PpapiThread::SetActiveURL(const std::string& url) { | 244 void PpapiThread::SetActiveURL(const std::string& url) { |
245 GetContentClient()->SetActiveURL(GURL(url)); | 245 GetContentClient()->SetActiveURL(GURL(url)); |
246 } | 246 } |
247 | 247 |
248 PP_Resource PpapiThread::CreateBrowserFont( | 248 PP_Resource PpapiThread::CreateBrowserFont( |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 std::string("Plugin.Ppapi") + (is_broker_ ? "Broker" : "Plugin") + | 580 std::string("Plugin.Ppapi") + (is_broker_ ? "Broker" : "Plugin") + |
581 "LoadErrorCode_" + path.BaseName().MaybeAsASCII(); | 581 "LoadErrorCode_" + path.BaseName().MaybeAsASCII(); |
582 | 582 |
583 // For sparse histograms, we can use the macro, as it does not incorporate a | 583 // For sparse histograms, we can use the macro, as it does not incorporate a |
584 // static. | 584 // static. |
585 UMA_HISTOGRAM_SPARSE_SLOWLY(histogram_name, error.code); | 585 UMA_HISTOGRAM_SPARSE_SLOWLY(histogram_name, error.code); |
586 #endif | 586 #endif |
587 } | 587 } |
588 | 588 |
589 } // namespace content | 589 } // namespace content |
OLD | NEW |