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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 11578038: Convert pepper font list to new resource system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 8 years 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 | « webkit/plugins/ppapi/ppapi_plugin_instance.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) 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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 2005 matching lines...) Expand 10 before | Expand all | Expand 10 after
2016 uint32_t PluginInstance::GetAudioHardwareOutputBufferSize( 2016 uint32_t PluginInstance::GetAudioHardwareOutputBufferSize(
2017 PP_Instance instance) { 2017 PP_Instance instance) {
2018 return delegate()->GetAudioHardwareOutputBufferSize(); 2018 return delegate()->GetAudioHardwareOutputBufferSize();
2019 } 2019 }
2020 2020
2021 PP_Var PluginInstance::GetDefaultCharSet(PP_Instance instance) { 2021 PP_Var PluginInstance::GetDefaultCharSet(PP_Instance instance) {
2022 std::string encoding = delegate()->GetDefaultEncoding(); 2022 std::string encoding = delegate()->GetDefaultEncoding();
2023 return StringVar::StringToPPVar(encoding); 2023 return StringVar::StringToPPVar(encoding);
2024 } 2024 }
2025 2025
2026 PP_Var PluginInstance::GetFontFamilies(PP_Instance instance) {
2027 // No in-process implementation.
2028 return PP_MakeUndefined();
2029 }
2030
2031 // These PPB_ContentDecryptor_Private calls are responses to 2026 // These PPB_ContentDecryptor_Private calls are responses to
2032 // PPP_ContentDecryptor_Private calls made on |content_decryptor_delegate_|. 2027 // PPP_ContentDecryptor_Private calls made on |content_decryptor_delegate_|.
2033 // Therefore, |content_decryptor_delegate_| must have been initialized when 2028 // Therefore, |content_decryptor_delegate_| must have been initialized when
2034 // the following methods are called. 2029 // the following methods are called.
2035 void PluginInstance::NeedKey(PP_Instance instance, 2030 void PluginInstance::NeedKey(PP_Instance instance,
2036 PP_Var key_system_var, 2031 PP_Var key_system_var,
2037 PP_Var session_id_var, 2032 PP_Var session_id_var,
2038 PP_Var init_data_var) { 2033 PP_Var init_data_var) {
2039 content_decryptor_delegate_->NeedKey( 2034 content_decryptor_delegate_->NeedKey(
2040 key_system_var, session_id_var, init_data_var); 2035 key_system_var, session_id_var, init_data_var);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
2143 ::ppapi::thunk::PPB_Flash_API* PluginInstance::GetFlashAPI() { 2138 ::ppapi::thunk::PPB_Flash_API* PluginInstance::GetFlashAPI() {
2144 return &flash_impl_; 2139 return &flash_impl_;
2145 } 2140 }
2146 2141
2147 ::ppapi::Resource* PluginInstance::GetSingletonResource( 2142 ::ppapi::Resource* PluginInstance::GetSingletonResource(
2148 PP_Instance instance, 2143 PP_Instance instance,
2149 ::ppapi::SingletonResourceID id) { 2144 ::ppapi::SingletonResourceID id) {
2150 // Flash APIs and some others aren't implemented in-process. 2145 // Flash APIs and some others aren't implemented in-process.
2151 switch (id) { 2146 switch (id) {
2152 case ::ppapi::BROKER_SINGLETON_ID: 2147 case ::ppapi::BROKER_SINGLETON_ID:
2148 case ::ppapi::BROWSER_FONT_SINGLETON_ID:
2153 case ::ppapi::FLASH_CLIPBOARD_SINGLETON_ID: 2149 case ::ppapi::FLASH_CLIPBOARD_SINGLETON_ID:
2154 case ::ppapi::FLASH_FILE_SINGLETON_ID: 2150 case ::ppapi::FLASH_FILE_SINGLETON_ID:
2155 case ::ppapi::FLASH_FULLSCREEN_SINGLETON_ID: 2151 case ::ppapi::FLASH_FULLSCREEN_SINGLETON_ID:
2156 case ::ppapi::FLASH_SINGLETON_ID: 2152 case ::ppapi::FLASH_SINGLETON_ID:
2157 NOTIMPLEMENTED(); 2153 NOTIMPLEMENTED();
2158 return NULL; 2154 return NULL;
2159 case ::ppapi::GAMEPAD_SINGLETON_ID: 2155 case ::ppapi::GAMEPAD_SINGLETON_ID:
2160 return gamepad_impl_; 2156 return gamepad_impl_;
2161 } 2157 }
2162 2158
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 screen_size_for_fullscreen_ = gfx::Size(); 2507 screen_size_for_fullscreen_ = gfx::Size();
2512 WebElement element = container_->element(); 2508 WebElement element = container_->element();
2513 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2509 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2514 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2510 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2515 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2511 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2516 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2512 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2517 } 2513 }
2518 2514
2519 } // namespace ppapi 2515 } // namespace ppapi
2520 } // namespace webkit 2516 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698