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 "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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 ScopedComPtr<IChromeFramePrivileged> service; | 403 ScopedComPtr<IChromeFramePrivileged> service; |
404 HRESULT service_hr = DoQueryService(SID_ChromeFramePrivileged, client_site, | 404 HRESULT service_hr = DoQueryService(SID_ChromeFramePrivileged, client_site, |
405 service.Receive()); | 405 service.Receive()); |
406 if (SUCCEEDED(service_hr) && service) { | 406 if (SUCCEEDED(service_hr) && service) { |
407 // Does the host want privileged mode? | 407 // Does the host want privileged mode? |
408 boolean wants_privileged = false; | 408 boolean wants_privileged = false; |
409 service_hr = service->GetWantsPrivileged(&wants_privileged); | 409 service_hr = service->GetWantsPrivileged(&wants_privileged); |
410 | 410 |
411 if (SUCCEEDED(service_hr) && wants_privileged) | 411 if (SUCCEEDED(service_hr) && wants_privileged) |
412 is_privileged_ = true; | 412 is_privileged_ = true; |
| 413 |
| 414 url_fetcher_.set_privileged_mode(is_privileged_); |
413 } | 415 } |
414 | 416 |
415 std::wstring chrome_extra_arguments; | 417 std::wstring chrome_extra_arguments; |
416 std::wstring profile_name(GetHostProcessName(false)); | 418 std::wstring profile_name(GetHostProcessName(false)); |
417 if (is_privileged_) { | 419 if (is_privileged_) { |
418 // Does the host want to provide extra arguments? | 420 // Does the host want to provide extra arguments? |
419 ScopedBstr extra_arguments_arg; | 421 ScopedBstr extra_arguments_arg; |
420 service_hr = service->GetChromeExtraArguments( | 422 service_hr = service->GetChromeExtraArguments( |
421 extra_arguments_arg.Receive()); | 423 extra_arguments_arg.Receive()); |
422 if (S_OK == service_hr && extra_arguments_arg) | 424 if (S_OK == service_hr && extra_arguments_arg) |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 if (FAILED(hr)) | 589 if (FAILED(hr)) |
588 return hr; | 590 return hr; |
589 | 591 |
590 HWND top_window = ::GetAncestor(parent_wnd, GA_ROOT); | 592 HWND top_window = ::GetAncestor(parent_wnd, GA_ROOT); |
591 chrome_wndproc_hook_ = InstallLocalWindowHook(top_window); | 593 chrome_wndproc_hook_ = InstallLocalWindowHook(top_window); |
592 if (chrome_wndproc_hook_) | 594 if (chrome_wndproc_hook_) |
593 TopLevelWindowMapping::instance()->AddMapping(top_window, m_hWnd); | 595 TopLevelWindowMapping::instance()->AddMapping(top_window, m_hWnd); |
594 | 596 |
595 return chrome_wndproc_hook_ ? S_OK : E_FAIL; | 597 return chrome_wndproc_hook_ ? S_OK : E_FAIL; |
596 } | 598 } |
OLD | NEW |