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

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

Issue 10681006: Add ppapi interface for setting crash data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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/ppb_flash_proxy.h ('k') | ppapi/tests/test_flash.h » ('j') | 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 plugin_dispatcher->preferences().is_stage3d_supported)); 300 plugin_dispatcher->preferences().is_stage3d_supported));
301 case PP_FLASHSETTING_LANGUAGE: 301 case PP_FLASHSETTING_LANGUAGE:
302 return StringVar::StringToPPVar( 302 return StringVar::StringToPPVar(
303 PluginGlobals::Get()->plugin_proxy_delegate()->GetUILanguage()); 303 PluginGlobals::Get()->plugin_proxy_delegate()->GetUILanguage());
304 case PP_FLASHSETTING_NUMCORES: 304 case PP_FLASHSETTING_NUMCORES:
305 return PP_MakeInt32(plugin_dispatcher->preferences().number_of_cpu_cores); 305 return PP_MakeInt32(plugin_dispatcher->preferences().number_of_cpu_cores);
306 } 306 }
307 return PP_MakeUndefined(); 307 return PP_MakeUndefined();
308 } 308 }
309 309
310 PP_Bool PPB_Flash_Proxy::SetCrashData(PP_Instance instance,
311 PP_FlashCrashKey key,
312 PP_Var value) {
313 switch (key) {
314 case PP_FLASHCRASHKEY_URL:
315 StringVar *url_string_var(StringVar::FromPPVar(value));
316 if (!url_string_var)
317 return PP_FALSE;
318 std::string url_string(url_string_var->value());
319 PluginGlobals::Get()->plugin_proxy_delegate()->SetActiveURL(url_string);
320 return PP_TRUE;
321 }
322 return PP_FALSE;
323 }
324
310 PP_Bool PPB_Flash_Proxy::IsClipboardFormatAvailable( 325 PP_Bool PPB_Flash_Proxy::IsClipboardFormatAvailable(
311 PP_Instance instance, 326 PP_Instance instance,
312 PP_Flash_Clipboard_Type clipboard_type, 327 PP_Flash_Clipboard_Type clipboard_type,
313 PP_Flash_Clipboard_Format format) { 328 PP_Flash_Clipboard_Format format) {
314 if (!IsValidClipboardType(clipboard_type) || !IsValidClipboardFormat(format)) 329 if (!IsValidClipboardType(clipboard_type) || !IsValidClipboardFormat(format))
315 return PP_FALSE; 330 return PP_FALSE;
316 331
317 bool result = false; 332 bool result = false;
318 dispatcher()->Send(new PpapiHostMsg_PPBFlash_IsClipboardFormatAvailable( 333 dispatcher()->Send(new PpapiHostMsg_PPBFlash_IsClipboardFormatAvailable(
319 API_ID_PPB_FLASH, 334 API_ID_PPB_FLASH,
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 // It's rarely used enough that we just request this interface when needed. 847 // It's rarely used enough that we just request this interface when needed.
833 const PPB_Flash_Print_1_0* print_interface = 848 const PPB_Flash_Print_1_0* print_interface =
834 static_cast<const PPB_Flash_Print_1_0*>( 849 static_cast<const PPB_Flash_Print_1_0*>(
835 dispatcher()->local_get_interface()(PPB_FLASH_PRINT_INTERFACE_1_0)); 850 dispatcher()->local_get_interface()(PPB_FLASH_PRINT_INTERFACE_1_0));
836 if (print_interface) 851 if (print_interface)
837 print_interface->InvokePrinting(instance); 852 print_interface->InvokePrinting(instance);
838 } 853 }
839 854
840 } // namespace proxy 855 } // namespace proxy
841 } // namespace ppapi 856 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_flash_proxy.h ('k') | ppapi/tests/test_flash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698