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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 InitializeAutomationSettings(); | 466 InitializeAutomationSettings(); |
467 | 467 |
468 url_fetcher_->set_frame_busting(!is_privileged_); | 468 url_fetcher_->set_frame_busting(!is_privileged_); |
469 automation_client_->SetUrlFetcher(url_fetcher_.get()); | 469 automation_client_->SetUrlFetcher(url_fetcher_.get()); |
470 if (!InitializeAutomation(profile_name, chrome_extra_arguments, | 470 if (!InitializeAutomation(profile_name, chrome_extra_arguments, |
471 IsIEInPrivate(), true, GURL(utf8_url), | 471 IsIEInPrivate(), true, GURL(utf8_url), |
472 GURL())) { | 472 GURL())) { |
473 DLOG(ERROR) << "Failed to navigate to url:" << utf8_url; | 473 DLOG(ERROR) << "Failed to navigate to url:" << utf8_url; |
474 return E_FAIL; | 474 return E_FAIL; |
475 } | 475 } |
| 476 |
| 477 // Log a metric that Chrome Frame is being used in Widget mode |
| 478 THREAD_SAFE_UMA_LAUNCH_TYPE_COUNT(RENDERER_TYPE_CHROME_WIDGET); |
476 } | 479 } |
477 | 480 |
478 return hr; | 481 return hr; |
479 } | 482 } |
480 | 483 |
481 HRESULT ChromeFrameActivex::GetObjectScriptId(IHTMLObjectElement* object_elem, | 484 HRESULT ChromeFrameActivex::GetObjectScriptId(IHTMLObjectElement* object_elem, |
482 BSTR* id) { | 485 BSTR* id) { |
483 DCHECK(object_elem != NULL); | 486 DCHECK(object_elem != NULL); |
484 DCHECK(id != NULL); | 487 DCHECK(id != NULL); |
485 | 488 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 if (FAILED(hr)) { | 659 if (FAILED(hr)) { |
657 NOTREACHED() << "ChromeFrame BHO SetSite failed. Error:" | 660 NOTREACHED() << "ChromeFrame BHO SetSite failed. Error:" |
658 << StringPrintf(" 0x%08X", hr); | 661 << StringPrintf(" 0x%08X", hr); |
659 return hr; | 662 return hr; |
660 } | 663 } |
661 | 664 |
662 web_browser2->PutProperty(ScopedBstr(bho_class_id_as_string), | 665 web_browser2->PutProperty(ScopedBstr(bho_class_id_as_string), |
663 ScopedVariant(bho)); | 666 ScopedVariant(bho)); |
664 return S_OK; | 667 return S_OK; |
665 } | 668 } |
OLD | NEW |