| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 } | 456 } |
| 457 | 457 |
| 458 std::string utf8_url; | 458 std::string utf8_url; |
| 459 if (url_.Length()) { | 459 if (url_.Length()) { |
| 460 WideToUTF8(url_, url_.Length(), &utf8_url); | 460 WideToUTF8(url_, url_.Length(), &utf8_url); |
| 461 } | 461 } |
| 462 | 462 |
| 463 // Only privileged instances of ActiveX Chrome Frame controls may read | 463 // Only privileged instances of ActiveX Chrome Frame controls may read |
| 464 // the chrome-network, and top-level-navigation settings from the registry. | 464 // the chrome-network, and top-level-navigation settings from the registry. |
| 465 // See issue: 54920 | 465 // See issue: 54920 |
| 466 if (is_privileged_) | 466 InitializeAutomationSettings(); |
| 467 InitializeAutomationSettings(); | |
| 468 | 467 |
| 469 url_fetcher_->set_frame_busting(!is_privileged_); | 468 url_fetcher_->set_frame_busting(!is_privileged_); |
| 470 automation_client_->SetUrlFetcher(url_fetcher_.get()); | 469 automation_client_->SetUrlFetcher(url_fetcher_.get()); |
| 471 if (!InitializeAutomation(profile_name, chrome_extra_arguments, | 470 if (!InitializeAutomation(profile_name, chrome_extra_arguments, |
| 472 IsIEInPrivate(), true, GURL(utf8_url), | 471 IsIEInPrivate(), true, GURL(utf8_url), |
| 473 GURL())) { | 472 GURL(), false)) { |
| 474 DLOG(ERROR) << "Failed to navigate to url:" << utf8_url; | 473 DLOG(ERROR) << "Failed to navigate to url:" << utf8_url; |
| 475 return E_FAIL; | 474 return E_FAIL; |
| 476 } | 475 } |
| 477 | 476 |
| 478 // Log a metric that Chrome Frame is being used in Widget mode | 477 // Log a metric that Chrome Frame is being used in Widget mode |
| 479 THREAD_SAFE_UMA_LAUNCH_TYPE_COUNT(RENDERER_TYPE_CHROME_WIDGET); | 478 THREAD_SAFE_UMA_LAUNCH_TYPE_COUNT(RENDERER_TYPE_CHROME_WIDGET); |
| 480 } | 479 } |
| 481 | 480 |
| 482 return hr; | 481 return hr; |
| 483 } | 482 } |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 if (FAILED(hr)) { | 659 if (FAILED(hr)) { |
| 661 NOTREACHED() << "ChromeFrame BHO SetSite failed. Error:" | 660 NOTREACHED() << "ChromeFrame BHO SetSite failed. Error:" |
| 662 << StringPrintf(" 0x%08X", hr); | 661 << StringPrintf(" 0x%08X", hr); |
| 663 return hr; | 662 return hr; |
| 664 } | 663 } |
| 665 | 664 |
| 666 web_browser2->PutProperty(ScopedBstr(bho_class_id_as_string), | 665 web_browser2->PutProperty(ScopedBstr(bho_class_id_as_string), |
| 667 ScopedVariant(bho)); | 666 ScopedVariant(bho)); |
| 668 return S_OK; | 667 return S_OK; |
| 669 } | 668 } |
| OLD | NEW |