| OLD | NEW | 
|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/plugin/chrome_plugin_host.h" | 5 #include "chrome/plugin/chrome_plugin_host.h" | 
| 6 | 6 | 
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" | 
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" | 
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" | 
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" | 
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 433     std::string retval = WideToUTF8( | 433     std::string retval = WideToUTF8( | 
| 434         path.Append(chrome::kChromePluginDataDirname).ToWStringHack()); | 434         path.Append(chrome::kChromePluginDataDirname).ToWStringHack()); | 
| 435     *static_cast<char**>(buf) = CPB_StringDup(CPB_Alloc, retval); | 435     *static_cast<char**>(buf) = CPB_StringDup(CPB_Alloc, retval); | 
| 436 | 436 | 
| 437     return CPERR_SUCCESS; | 437     return CPERR_SUCCESS; | 
| 438     } | 438     } | 
| 439   case CPBROWSINGCONTEXT_UI_LOCALE_PTR: { | 439   case CPBROWSINGCONTEXT_UI_LOCALE_PTR: { | 
| 440     if (buf_size < sizeof(char*)) | 440     if (buf_size < sizeof(char*)) | 
| 441       return sizeof(char*); | 441       return sizeof(char*); | 
| 442 | 442 | 
| 443     std::wstring wretval = webkit_glue::GetWebKitLocale(); | 443     std::string retval = webkit_glue::GetWebKitLocale(); | 
| 444     *static_cast<char**>(buf) = CPB_StringDup(CPB_Alloc, WideToUTF8(wretval)); | 444     *static_cast<char**>(buf) = CPB_StringDup(CPB_Alloc, retval); | 
| 445     return CPERR_SUCCESS; | 445     return CPERR_SUCCESS; | 
| 446     } | 446     } | 
| 447   } | 447   } | 
| 448 | 448 | 
| 449   return CPERR_FAILURE; | 449   return CPERR_FAILURE; | 
| 450 } | 450 } | 
| 451 | 451 | 
| 452 CPError STDCALL CPB_AddUICommand(CPID id, int command) { | 452 CPError STDCALL CPB_AddUICommand(CPID id, int command) { | 
| 453   // Not implemented in the plugin process | 453   // Not implemented in the plugin process | 
| 454   return CPERR_FAILURE; | 454   return CPERR_FAILURE; | 
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 715 | 715 | 
| 716     response_funcs.size = sizeof(response_funcs); | 716     response_funcs.size = sizeof(response_funcs); | 
| 717     response_funcs.received_redirect = CPRR_ReceivedRedirect; | 717     response_funcs.received_redirect = CPRR_ReceivedRedirect; | 
| 718     response_funcs.start_completed = CPRR_StartCompleted; | 718     response_funcs.start_completed = CPRR_StartCompleted; | 
| 719     response_funcs.read_completed = CPRR_ReadCompleted; | 719     response_funcs.read_completed = CPRR_ReadCompleted; | 
| 720     response_funcs.upload_progress = CPRR_UploadProgress; | 720     response_funcs.upload_progress = CPRR_UploadProgress; | 
| 721   } | 721   } | 
| 722 | 722 | 
| 723   return &browser_funcs; | 723   return &browser_funcs; | 
| 724 } | 724 } | 
| OLD | NEW | 
|---|