| 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 #ifndef CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ | 5 #ifndef CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ |
| 6 #define CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ | 6 #define CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ |
| 7 | 7 |
| 8 #include <atlbase.h> | 8 #include <atlbase.h> |
| 9 #include <atlcom.h> | 9 #include <atlcom.h> |
| 10 #include <atlctl.h> | 10 #include <atlctl.h> |
| 11 #include <wininet.h> | 11 #include <wininet.h> |
| 12 #include <shdeprecated.h> // for IBrowserService2 | 12 #include <shdeprecated.h> // for IBrowserService2 |
| 13 #include <shlguid.h> | 13 #include <shlguid.h> |
| 14 | 14 |
| 15 #include <set> | 15 #include <set> |
| 16 #include <string> | 16 #include <string> |
| 17 #include <vector> | 17 #include <vector> |
| 18 | 18 |
| 19 #include "base/metrics/histogram.h" | 19 #include "base/metrics/histogram.h" |
| 20 #include "base/string_util.h" | 20 #include "base/string_util.h" |
| 21 #include "base/stringprintf.h" | 21 #include "base/stringprintf.h" |
| 22 #include "base/utf_string_conversions.h" | 22 #include "base/utf_string_conversions.h" |
| 23 #include "base/win/scoped_bstr.h" | 23 #include "base/win/scoped_bstr.h" |
| 24 #include "base/win/scoped_comptr.h" | 24 #include "base/win/scoped_comptr.h" |
| 25 #include "base/win/scoped_variant.h" | 25 #include "base/win/scoped_variant.h" |
| 26 #include "grit/chrome_frame_resources.h" | 26 #include "grit/chrome_frame_resources.h" |
| 27 #include "ceee/ie/common/ceee_util.h" |
| 27 #include "chrome/common/url_constants.h" | 28 #include "chrome/common/url_constants.h" |
| 28 #include "chrome_frame/chrome_frame_plugin.h" | 29 #include "chrome_frame/chrome_frame_plugin.h" |
| 29 #include "chrome_frame/com_message_event.h" | 30 #include "chrome_frame/com_message_event.h" |
| 30 #include "chrome_frame/com_type_info_holder.h" | 31 #include "chrome_frame/com_type_info_holder.h" |
| 31 #include "chrome_frame/simple_resource_loader.h" | 32 #include "chrome_frame/simple_resource_loader.h" |
| 32 #include "chrome_frame/urlmon_url_request.h" | 33 #include "chrome_frame/urlmon_url_request.h" |
| 33 #include "chrome_frame/urlmon_url_request_private.h" | 34 #include "chrome_frame/urlmon_url_request_private.h" |
| 34 #include "chrome_frame/utils.h" | 35 #include "chrome_frame/utils.h" |
| 35 #include "grit/generated_resources.h" | 36 #include "grit/generated_resources.h" |
| 36 #include "net/base/cookie_monster.h" | 37 #include "net/base/cookie_monster.h" |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 return true; | 405 return true; |
| 405 } | 406 } |
| 406 | 407 |
| 407 protected: | 408 protected: |
| 408 virtual void GetProfilePath(const std::wstring& profile_name, | 409 virtual void GetProfilePath(const std::wstring& profile_name, |
| 409 FilePath* profile_path) { | 410 FilePath* profile_path) { |
| 410 bool is_IE = (lstrcmpi(profile_name.c_str(), kIexploreProfileName) == 0) || | 411 bool is_IE = (lstrcmpi(profile_name.c_str(), kIexploreProfileName) == 0) || |
| 411 (lstrcmpi(profile_name.c_str(), kRundllProfileName) == 0); | 412 (lstrcmpi(profile_name.c_str(), kRundllProfileName) == 0); |
| 412 // Browsers without IDeleteBrowsingHistory in non-priv mode | 413 // Browsers without IDeleteBrowsingHistory in non-priv mode |
| 413 // have their profiles moved into "Temporary Internet Files". | 414 // have their profiles moved into "Temporary Internet Files". |
| 414 if (is_IE && GetIEVersion() < IE_8 && !is_privileged_) { | 415 // |
| 416 // If CEEE is registered, we must have a persistent profile. We |
| 417 // considered checking if e.g. ceee_ie.dll is loaded in the process |
| 418 // but this gets into edge cases when the user enables the CEEE add-on |
| 419 // after CF is first loaded. |
| 420 if (is_IE && GetIEVersion() < IE_8 && !ceee_util::IsIeCeeeRegistered()) { |
| 415 *profile_path = GetIETemporaryFilesFolder(); | 421 *profile_path = GetIETemporaryFilesFolder(); |
| 416 *profile_path = profile_path->Append(L"Google Chrome Frame"); | 422 *profile_path = profile_path->Append(L"Google Chrome Frame"); |
| 417 } else { | 423 } else { |
| 418 ChromeFramePlugin::GetProfilePath(profile_name, profile_path); | 424 ChromeFramePlugin::GetProfilePath(profile_name, profile_path); |
| 419 } | 425 } |
| 420 DVLOG(1) << __FUNCTION__ << ": " << profile_path->value(); | 426 DVLOG(1) << __FUNCTION__ << ": " << profile_path->value(); |
| 421 } | 427 } |
| 422 | 428 |
| 423 void OnLoad(int tab_handle, const GURL& url) { | 429 void OnLoad(int tab_handle, const GURL& url) { |
| 424 if (ready_state_ < READYSTATE_COMPLETE) { | 430 if (ready_state_ < READYSTATE_COMPLETE) { |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1276 EventHandlers onextensionready_; | 1282 EventHandlers onextensionready_; |
| 1277 | 1283 |
| 1278 // Handle network requests when host network stack is used. Passed to the | 1284 // Handle network requests when host network stack is used. Passed to the |
| 1279 // automation client on initialization. | 1285 // automation client on initialization. |
| 1280 scoped_ptr<UrlmonUrlRequestManager> url_fetcher_; | 1286 scoped_ptr<UrlmonUrlRequestManager> url_fetcher_; |
| 1281 | 1287 |
| 1282 HINSTANCE prev_resource_instance_; | 1288 HINSTANCE prev_resource_instance_; |
| 1283 }; | 1289 }; |
| 1284 | 1290 |
| 1285 #endif // CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ | 1291 #endif // CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ |
| OLD | NEW |