OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/pdf_resource.h" | 5 #include "ppapi/proxy/pdf_resource.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace ppapi { | 21 namespace ppapi { |
22 namespace proxy { | 22 namespace proxy { |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 // TODO(raymes): This is just copied from render_thread_impl.cc. We should have | 26 // TODO(raymes): This is just copied from render_thread_impl.cc. We should have |
27 // generic code somewhere to get the locale in the plugin. | 27 // generic code somewhere to get the locale in the plugin. |
28 std::string GetLocale() { | 28 std::string GetLocale() { |
29 // The browser process should have passed the locale to the plugin via the | 29 // The browser process should have passed the locale to the plugin via the |
30 // --lang command line flag. | 30 // --lang command line flag. |
31 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | 31 const base::CommandLine& parsed_command_line = |
| 32 *base::CommandLine::ForCurrentProcess(); |
32 const std::string& lang = parsed_command_line.GetSwitchValueASCII("lang"); | 33 const std::string& lang = parsed_command_line.GetSwitchValueASCII("lang"); |
33 DCHECK(!lang.empty()); | 34 DCHECK(!lang.empty()); |
34 return lang; | 35 return lang; |
35 } | 36 } |
36 | 37 |
37 } // namespace | 38 } // namespace |
38 | 39 |
39 PDFResource::PDFResource(Connection connection, PP_Instance instance) | 40 PDFResource::PDFResource(Connection connection, PP_Instance instance) |
40 : PluginResource(connection, instance) { | 41 : PluginResource(connection, instance) { |
41 SendCreate(RENDERER, PpapiHostMsg_PDF_Create()); | 42 SendCreate(RENDERER, PpapiHostMsg_PDF_Create()); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 void PDFResource::GetV8ExternalSnapshotData(const char** natives_data_out, | 209 void PDFResource::GetV8ExternalSnapshotData(const char** natives_data_out, |
209 int* natives_size_out, | 210 int* natives_size_out, |
210 const char** snapshot_data_out, | 211 const char** snapshot_data_out, |
211 int* snapshot_size_out) { | 212 int* snapshot_size_out) { |
212 gin::IsolateHolder::GetV8ExternalSnapshotData(natives_data_out, | 213 gin::IsolateHolder::GetV8ExternalSnapshotData(natives_data_out, |
213 natives_size_out, snapshot_data_out, snapshot_size_out); | 214 natives_size_out, snapshot_data_out, snapshot_size_out); |
214 } | 215 } |
215 | 216 |
216 } // namespace proxy | 217 } // namespace proxy |
217 } // namespace ppapi | 218 } // namespace ppapi |
OLD | NEW |