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

Side by Side Diff: ppapi/proxy/ppb_flash_proxy.cc

Issue 10541088: Propogate the UI language on the command line and expose to Flash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | « ppapi/proxy/ppapi_proxy_test.cc ('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 "ppapi/proxy/ppb_flash_proxy.h" 5 #include "ppapi/proxy/ppb_flash_proxy.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "ppapi/c/dev/ppb_font_dev.h" 10 #include "ppapi/c/dev/ppb_font_dev.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 case PP_FLASHSETTING_STAGE3DENABLED: 280 case PP_FLASHSETTING_STAGE3DENABLED:
281 return static_cast<PluginDispatcher*>(dispatcher())->preferences(). 281 return static_cast<PluginDispatcher*>(dispatcher())->preferences().
282 is_stage3d_supported; 282 is_stage3d_supported;
283 default: 283 default:
284 return -1; 284 return -1;
285 } 285 }
286 } 286 }
287 287
288 PP_Var PPB_Flash_Proxy::GetSetting(PP_Instance instance, 288 PP_Var PPB_Flash_Proxy::GetSetting(PP_Instance instance,
289 PP_FlashSetting setting) { 289 PP_FlashSetting setting) {
290 ReceiveSerializedVarReturnValue result;
291 PluginDispatcher* plugin_dispatcher = 290 PluginDispatcher* plugin_dispatcher =
292 static_cast<PluginDispatcher*>(dispatcher()); 291 static_cast<PluginDispatcher*>(dispatcher());
293 switch (setting) { 292 switch (setting) {
294 case PP_FLASHSETTING_3DENABLED: 293 case PP_FLASHSETTING_3DENABLED:
295 return PP_MakeBool(PP_FromBool( 294 return PP_MakeBool(PP_FromBool(
296 plugin_dispatcher->preferences().is_3d_supported)); 295 plugin_dispatcher->preferences().is_3d_supported));
297 case PP_FLASHSETTING_INCOGNITO: 296 case PP_FLASHSETTING_INCOGNITO:
298 return PP_MakeBool(PP_FromBool(plugin_dispatcher->incognito())); 297 return PP_MakeBool(PP_FromBool(plugin_dispatcher->incognito()));
299 case PP_FLASHSETTING_STAGE3DENABLED: 298 case PP_FLASHSETTING_STAGE3DENABLED:
300 return PP_MakeBool(PP_FromBool( 299 return PP_MakeBool(PP_FromBool(
301 plugin_dispatcher->preferences().is_stage3d_supported)); 300 plugin_dispatcher->preferences().is_stage3d_supported));
301 case PP_FLASHSETTING_LANGUAGE:
302 return StringVar::StringToPPVar(
303 PluginGlobals::Get()->plugin_proxy_delegate()->GetUILanguage());
302 } 304 }
303 return PP_MakeUndefined(); 305 return PP_MakeUndefined();
304 } 306 }
305 307
306 PP_Bool PPB_Flash_Proxy::IsClipboardFormatAvailable( 308 PP_Bool PPB_Flash_Proxy::IsClipboardFormatAvailable(
307 PP_Instance instance, 309 PP_Instance instance,
308 PP_Flash_Clipboard_Type clipboard_type, 310 PP_Flash_Clipboard_Type clipboard_type,
309 PP_Flash_Clipboard_Format format) { 311 PP_Flash_Clipboard_Format format) {
310 if (!IsValidClipboardType(clipboard_type) || !IsValidClipboardFormat(format)) 312 if (!IsValidClipboardType(clipboard_type) || !IsValidClipboardFormat(format))
311 return PP_FALSE; 313 return PP_FALSE;
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 // It's rarely used enough that we just request this interface when needed. 811 // It's rarely used enough that we just request this interface when needed.
810 const PPB_Flash_Print_1_0* print_interface = 812 const PPB_Flash_Print_1_0* print_interface =
811 static_cast<const PPB_Flash_Print_1_0*>( 813 static_cast<const PPB_Flash_Print_1_0*>(
812 dispatcher()->local_get_interface()(PPB_FLASH_PRINT_INTERFACE_1_0)); 814 dispatcher()->local_get_interface()(PPB_FLASH_PRINT_INTERFACE_1_0));
813 if (print_interface) 815 if (print_interface)
814 print_interface->InvokePrinting(instance); 816 print_interface->InvokePrinting(instance);
815 } 817 }
816 818
817 } // namespace proxy 819 } // namespace proxy
818 } // namespace ppapi 820 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698