OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 profile_name.assign(profile_name_arg, profile_name_arg.Length()); | 463 profile_name.assign(profile_name_arg, profile_name_arg.Length()); |
464 } | 464 } |
465 | 465 |
466 std::string utf8_url; | 466 std::string utf8_url; |
467 if (url_.Length()) { | 467 if (url_.Length()) { |
468 WideToUTF8(url_, url_.Length(), &utf8_url); | 468 WideToUTF8(url_, url_.Length(), &utf8_url); |
469 } | 469 } |
470 | 470 |
471 InitializeAutomationSettings(); | 471 InitializeAutomationSettings(); |
472 | 472 |
473 // To avoid http://code.google.com/p/chromium/issues/detail?id=63427, | |
474 // we always pass this flag needed by CEEE. It has no effect on | |
475 // normal CF operation. | |
476 // | |
477 // Extra arguments are passed on verbatim, so we add the -- prefix. | |
478 std::wstring chrome_extra_arguments(L"--"); | |
479 chrome_extra_arguments.append( | |
480 ASCIIToWide(switches::kEnableExperimentalExtensionApis)); | |
481 | |
482 url_fetcher_->set_frame_busting(!is_privileged()); | 473 url_fetcher_->set_frame_busting(!is_privileged()); |
483 automation_client_->SetUrlFetcher(url_fetcher_.get()); | 474 automation_client_->SetUrlFetcher(url_fetcher_.get()); |
484 if (!InitializeAutomation(profile_name, chrome_extra_arguments, | 475 if (!InitializeAutomation(profile_name, IsIEInPrivate(), true, |
485 IsIEInPrivate(), true, GURL(utf8_url), | 476 GURL(utf8_url), GURL(), false)) { |
486 GURL(), false)) { | |
487 DLOG(ERROR) << "Failed to navigate to url:" << utf8_url; | 477 DLOG(ERROR) << "Failed to navigate to url:" << utf8_url; |
488 return E_FAIL; | 478 return E_FAIL; |
489 } | 479 } |
490 | 480 |
491 // Log a metric that Chrome Frame is being used in Widget mode | 481 // Log a metric that Chrome Frame is being used in Widget mode |
492 UMA_LAUNCH_TYPE_COUNT(RENDERER_TYPE_CHROME_WIDGET); | 482 UMA_LAUNCH_TYPE_COUNT(RENDERER_TYPE_CHROME_WIDGET); |
493 } | 483 } |
494 | 484 |
495 return hr; | 485 return hr; |
496 } | 486 } |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 if (FAILED(hr)) { | 673 if (FAILED(hr)) { |
684 NOTREACHED() << "ChromeFrame BHO SetSite failed. Error:" | 674 NOTREACHED() << "ChromeFrame BHO SetSite failed. Error:" |
685 << base::StringPrintf(" 0x%08X", hr); | 675 << base::StringPrintf(" 0x%08X", hr); |
686 return hr; | 676 return hr; |
687 } | 677 } |
688 | 678 |
689 web_browser2->PutProperty(base::win::ScopedBstr(bho_class_id_as_string), | 679 web_browser2->PutProperty(base::win::ScopedBstr(bho_class_id_as_string), |
690 base::win::ScopedVariant(bho)); | 680 base::win::ScopedVariant(bho)); |
691 return S_OK; | 681 return S_OK; |
692 } | 682 } |
OLD | NEW |