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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include "chrome/browser/plugin_process_host.h" | 7 #include "chrome/browser/plugin_process_host.h" |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 std::set<HWND>::iterator window_index; | 322 std::set<HWND>::iterator window_index; |
323 for (window_index = plugin_parent_windows_set_.begin(); | 323 for (window_index = plugin_parent_windows_set_.begin(); |
324 window_index != plugin_parent_windows_set_.end(); | 324 window_index != plugin_parent_windows_set_.end(); |
325 window_index++) { | 325 window_index++) { |
326 PostMessage(*window_index, WM_CLOSE, 0, 0); | 326 PostMessage(*window_index, WM_CLOSE, 0, 0); |
327 } | 327 } |
328 #endif | 328 #endif |
329 } | 329 } |
330 | 330 |
331 bool PluginProcessHost::Init(const WebPluginInfo& info, | 331 bool PluginProcessHost::Init(const WebPluginInfo& info, |
332 const std::string& activex_clsid, | |
333 const std::wstring& locale) { | 332 const std::wstring& locale) { |
334 info_ = info; | 333 info_ = info; |
335 set_name(info_.name); | 334 set_name(info_.name); |
336 | 335 |
337 if (!CreateChannel()) | 336 if (!CreateChannel()) |
338 return false; | 337 return false; |
339 | 338 |
340 // build command line for plugin, we have to quote the plugin's path to deal | 339 // build command line for plugin, we have to quote the plugin's path to deal |
341 // with spaces. | 340 // with spaces. |
342 std::wstring exe_path = GetChildPath(); | 341 std::wstring exe_path = GetChildPath(); |
(...skipping 13 matching lines...) Expand all Loading... |
356 switches::kSafePlugins, | 355 switches::kSafePlugins, |
357 switches::kTestSandbox, | 356 switches::kTestSandbox, |
358 switches::kUserAgent, | 357 switches::kUserAgent, |
359 switches::kDisableBreakpad, | 358 switches::kDisableBreakpad, |
360 switches::kFullMemoryCrashReport, | 359 switches::kFullMemoryCrashReport, |
361 switches::kEnableLogging, | 360 switches::kEnableLogging, |
362 switches::kDisableLogging, | 361 switches::kDisableLogging, |
363 switches::kLoggingLevel, | 362 switches::kLoggingLevel, |
364 switches::kLogPluginMessages, | 363 switches::kLogPluginMessages, |
365 switches::kUserDataDir, | 364 switches::kUserDataDir, |
366 switches::kAllowAllActiveX, | |
367 switches::kEnableDCHECK, | 365 switches::kEnableDCHECK, |
368 switches::kSilentDumpOnDCHECK, | 366 switches::kSilentDumpOnDCHECK, |
369 switches::kMemoryProfiling, | 367 switches::kMemoryProfiling, |
370 switches::kUseLowFragHeapCrt, | 368 switches::kUseLowFragHeapCrt, |
371 switches::kEnableStatsTable, | 369 switches::kEnableStatsTable, |
372 }; | 370 }; |
373 | 371 |
374 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 372 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
375 | 373 |
376 for (size_t i = 0; i < arraysize(switch_names); ++i) { | 374 for (size_t i = 0; i < arraysize(switch_names); ++i) { |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 DCHECK(MessageLoop::current() == | 633 DCHECK(MessageLoop::current() == |
636 ChromeThread::GetMessageLoop(ChromeThread::IO)); | 634 ChromeThread::GetMessageLoop(ChromeThread::IO)); |
637 | 635 |
638 ChromePluginLib *chrome_plugin = ChromePluginLib::Find(info_.path); | 636 ChromePluginLib *chrome_plugin = ChromePluginLib::Find(info_.path); |
639 if (chrome_plugin) { | 637 if (chrome_plugin) { |
640 void *data_ptr = const_cast<void*>(reinterpret_cast<const void*>(&data[0])); | 638 void *data_ptr = const_cast<void*>(reinterpret_cast<const void*>(&data[0])); |
641 uint32 data_len = static_cast<uint32>(data.size()); | 639 uint32 data_len = static_cast<uint32>(data.size()); |
642 chrome_plugin->functions().on_message(data_ptr, data_len); | 640 chrome_plugin->functions().on_message(data_ptr, data_len); |
643 } | 641 } |
644 } | 642 } |
OLD | NEW |