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

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: 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
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 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after
2026 uint32_t PluginInstance::GetAudioHardwareOutputBufferSize( 2026 uint32_t PluginInstance::GetAudioHardwareOutputBufferSize(
2027 PP_Instance instance) { 2027 PP_Instance instance) {
2028 return delegate()->GetAudioHardwareOutputBufferSize(); 2028 return delegate()->GetAudioHardwareOutputBufferSize();
2029 } 2029 }
2030 2030
2031 PP_Var PluginInstance::GetDefaultCharSet(PP_Instance instance) { 2031 PP_Var PluginInstance::GetDefaultCharSet(PP_Instance instance) {
2032 std::string encoding = delegate()->GetDefaultEncoding(); 2032 std::string encoding = delegate()->GetDefaultEncoding();
2033 return StringVar::StringToPPVar(encoding); 2033 return StringVar::StringToPPVar(encoding);
2034 } 2034 }
2035 2035
2036 PP_Var PluginInstance::GetFontFamilies(PP_Instance instance) {
2037 // No in-process implementation.
2038 return PP_MakeUndefined();
2039 }
2040
2041 // These PPB_ContentDecryptor_Private calls are responses to 2036 // These PPB_ContentDecryptor_Private calls are responses to
2042 // PPP_ContentDecryptor_Private calls made on |content_decryptor_delegate_|. 2037 // PPP_ContentDecryptor_Private calls made on |content_decryptor_delegate_|.
2043 // Therefore, |content_decryptor_delegate_| must have been initialized when 2038 // Therefore, |content_decryptor_delegate_| must have been initialized when
2044 // the following methods are called. 2039 // the following methods are called.
2045 void PluginInstance::NeedKey(PP_Instance instance, 2040 void PluginInstance::NeedKey(PP_Instance instance,
2046 PP_Var key_system_var, 2041 PP_Var key_system_var,
2047 PP_Var session_id_var, 2042 PP_Var session_id_var,
2048 PP_Var init_data_var) { 2043 PP_Var init_data_var) {
2049 content_decryptor_delegate_->NeedKey( 2044 content_decryptor_delegate_->NeedKey(
2050 key_system_var, session_id_var, init_data_var); 2045 key_system_var, session_id_var, init_data_var);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
2142 2137
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:
raymes 2012/12/17 00:08:29 Forgot to add the in-process case. I guess it isn'
2153 case ::ppapi::FLASH_CLIPBOARD_SINGLETON_ID: 2148 case ::ppapi::FLASH_CLIPBOARD_SINGLETON_ID:
2154 case ::ppapi::FLASH_FILE_SINGLETON_ID: 2149 case ::ppapi::FLASH_FILE_SINGLETON_ID:
2155 case ::ppapi::FLASH_FULLSCREEN_SINGLETON_ID: 2150 case ::ppapi::FLASH_FULLSCREEN_SINGLETON_ID:
2156 case ::ppapi::FLASH_SINGLETON_ID: 2151 case ::ppapi::FLASH_SINGLETON_ID:
2157 NOTIMPLEMENTED(); 2152 NOTIMPLEMENTED();
2158 return NULL; 2153 return NULL;
2159 case ::ppapi::GAMEPAD_SINGLETON_ID: 2154 case ::ppapi::GAMEPAD_SINGLETON_ID:
2160 return gamepad_impl_; 2155 return gamepad_impl_;
2161 } 2156 }
2162 2157
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 screen_size_for_fullscreen_ = gfx::Size(); 2506 screen_size_for_fullscreen_ = gfx::Size();
2512 WebElement element = container_->element(); 2507 WebElement element = container_->element();
2513 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2508 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2514 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2509 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2515 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2510 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2516 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2511 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2517 } 2512 }
2518 2513
2519 } // namespace ppapi 2514 } // namespace ppapi
2520 } // namespace webkit 2515 } // namespace webkit
OLDNEW
« ppapi/proxy/ppapi_messages.h ('K') | « 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