| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_frame/chrome_frame_activex.h" | 5 #include "chrome_frame/chrome_frame_activex.h" |
| 6 | 6 |
| 7 #include <wininet.h> | 7 #include <wininet.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 chrome_extra_arguments.assign(extra_arguments_arg, | 438 chrome_extra_arguments.assign(extra_arguments_arg, |
| 439 extra_arguments_arg.Length()); | 439 extra_arguments_arg.Length()); |
| 440 | 440 |
| 441 ScopedBstr automated_functions_arg; | 441 ScopedBstr automated_functions_arg; |
| 442 service_hr = service->GetExtensionApisToAutomate( | 442 service_hr = service->GetExtensionApisToAutomate( |
| 443 automated_functions_arg.Receive()); | 443 automated_functions_arg.Receive()); |
| 444 if (S_OK == service_hr && automated_functions_arg) { | 444 if (S_OK == service_hr && automated_functions_arg) { |
| 445 std::string automated_functions( | 445 std::string automated_functions( |
| 446 WideToASCII(static_cast<BSTR>(automated_functions_arg))); | 446 WideToASCII(static_cast<BSTR>(automated_functions_arg))); |
| 447 functions_enabled_.clear(); | 447 functions_enabled_.clear(); |
| 448 // SplitString writes one empty entry for blank strings, so we need this | 448 // base::SplitString writes one empty entry for blank strings, so we |
| 449 // to allow specifying zero automation of API functions. | 449 // need this to allow specifying zero automation of API functions. |
| 450 if (!automated_functions.empty()) | 450 if (!automated_functions.empty()) |
| 451 SplitString(automated_functions, ',', &functions_enabled_); | 451 base::SplitString(automated_functions, ',', &functions_enabled_); |
| 452 } | 452 } |
| 453 | 453 |
| 454 ScopedBstr profile_name_arg; | 454 ScopedBstr profile_name_arg; |
| 455 service_hr = service->GetChromeProfileName(profile_name_arg.Receive()); | 455 service_hr = service->GetChromeProfileName(profile_name_arg.Receive()); |
| 456 if (S_OK == service_hr && profile_name_arg) | 456 if (S_OK == service_hr && profile_name_arg) |
| 457 profile_name.assign(profile_name_arg, profile_name_arg.Length()); | 457 profile_name.assign(profile_name_arg, profile_name_arg.Length()); |
| 458 } | 458 } |
| 459 | 459 |
| 460 std::string utf8_url; | 460 std::string utf8_url; |
| 461 if (url_.Length()) { | 461 if (url_.Length()) { |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 if (FAILED(hr)) { | 658 if (FAILED(hr)) { |
| 659 NOTREACHED() << "ChromeFrame BHO SetSite failed. Error:" | 659 NOTREACHED() << "ChromeFrame BHO SetSite failed. Error:" |
| 660 << base::StringPrintf(" 0x%08X", hr); | 660 << base::StringPrintf(" 0x%08X", hr); |
| 661 return hr; | 661 return hr; |
| 662 } | 662 } |
| 663 | 663 |
| 664 web_browser2->PutProperty(ScopedBstr(bho_class_id_as_string), | 664 web_browser2->PutProperty(ScopedBstr(bho_class_id_as_string), |
| 665 ScopedVariant(bho)); | 665 ScopedVariant(bho)); |
| 666 return S_OK; | 666 return S_OK; |
| 667 } | 667 } |
| OLD | NEW |