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 // chrome_tab.cc : Implementation of DLL Exports. | 5 // chrome_tab.cc : Implementation of DLL Exports. |
6 | 6 |
7 // Include without path to make GYP build see it. | 7 // Include without path to make GYP build see it. |
8 #include "chrome_tab.h" // NOLINT | 8 #include "chrome_tab.h" // NOLINT |
9 | 9 |
10 #include <atlsecurity.h> | 10 #include <atlsecurity.h> |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 | 592 |
593 HRESULT RegisterActiveX(bool reg, bool is_system) { | 593 HRESULT RegisterActiveX(bool reg, bool is_system) { |
594 // We have to call the static T::UpdateRegistry function instead of | 594 // We have to call the static T::UpdateRegistry function instead of |
595 // _AtlModule.UpdateRegistryFromResourceS(IDR_CHROMEFRAME_ACTIVEX, reg) | 595 // _AtlModule.UpdateRegistryFromResourceS(IDR_CHROMEFRAME_ACTIVEX, reg) |
596 // because there is specific OLEMISC replacement. | 596 // because there is specific OLEMISC replacement. |
597 return ChromeFrameActivex::UpdateRegistry(reg); | 597 return ChromeFrameActivex::UpdateRegistry(reg); |
598 } | 598 } |
599 | 599 |
600 HRESULT RegisterElevationPolicy(bool reg, bool is_system) { | 600 HRESULT RegisterElevationPolicy(bool reg, bool is_system) { |
601 HRESULT hr = S_OK; | 601 HRESULT hr = S_OK; |
602 if (reg && base::win::GetVersion() >= base::win::VERSION_VISTA) { | 602 if (base::win::GetVersion() >= base::win::VERSION_VISTA) { |
603 // Register the elevation policy. This must succeed for Chrome Frame to | 603 // Register the elevation policy. This must succeed for Chrome Frame to |
604 // be able launch Chrome when running in low-integrity IE. | 604 // be able launch Chrome when running in low-integrity IE. |
605 // Note that this is not done on unregistration, the installer will | 605 hr = _AtlModule.UpdateRegistryFromResourceS(IDR_CHROMEFRAME_ELEVATION, reg); |
606 // explicitly remove the policy on uninstall. | |
607 hr = _AtlModule.UpdateRegistryFromResourceS(IDR_CHROMEFRAME_ELEVATION, | |
608 reg); | |
609 if (SUCCEEDED(hr)) { | 606 if (SUCCEEDED(hr)) { |
610 hr = RefreshElevationPolicy(); | 607 hr = RefreshElevationPolicy(); |
611 } | 608 } |
612 } | 609 } |
613 return hr; | 610 return hr; |
614 } | 611 } |
615 | 612 |
616 HRESULT RegisterProtocol(bool reg, bool is_system) { | 613 HRESULT RegisterProtocol(bool reg, bool is_system) { |
617 return _AtlModule.UpdateRegistryFromResourceS(IDR_CHROMEPROTOCOL, reg); | 614 return _AtlModule.UpdateRegistryFromResourceS(IDR_CHROMEPROTOCOL, reg); |
618 } | 615 } |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 HRESULT hr = CustomRegistration(ALL, FALSE, false); | 908 HRESULT hr = CustomRegistration(ALL, FALSE, false); |
912 return hr; | 909 return hr; |
913 } | 910 } |
914 | 911 |
915 // Object entries go here instead of with each object, so that we can move | 912 // Object entries go here instead of with each object, so that we can move |
916 // the objects to a lib. Also reduces magic. | 913 // the objects to a lib. Also reduces magic. |
917 OBJECT_ENTRY_AUTO(CLSID_ChromeFrameBHO, Bho) | 914 OBJECT_ENTRY_AUTO(CLSID_ChromeFrameBHO, Bho) |
918 OBJECT_ENTRY_AUTO(__uuidof(ChromeActiveDocument), ChromeActiveDocument) | 915 OBJECT_ENTRY_AUTO(__uuidof(ChromeActiveDocument), ChromeActiveDocument) |
919 OBJECT_ENTRY_AUTO(__uuidof(ChromeFrame), ChromeFrameActivex) | 916 OBJECT_ENTRY_AUTO(__uuidof(ChromeFrame), ChromeFrameActivex) |
920 OBJECT_ENTRY_AUTO(__uuidof(ChromeProtocol), ChromeProtocol) | 917 OBJECT_ENTRY_AUTO(__uuidof(ChromeProtocol), ChromeProtocol) |
OLD | NEW |