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_ACTIVE_DOCUMENT_H_ | 5 #ifndef CHROME_FRAME_CHROME_ACTIVE_DOCUMENT_H_ |
6 #define CHROME_FRAME_CHROME_ACTIVE_DOCUMENT_H_ | 6 #define CHROME_FRAME_CHROME_ACTIVE_DOCUMENT_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 <htiframe.h> | 11 #include <htiframe.h> |
| 12 #include <map> |
12 #include <mshtmcid.h> | 13 #include <mshtmcid.h> |
13 #include <perhist.h> | 14 #include <perhist.h> |
14 | 15 #include <string> |
15 #include <map> | |
16 | 16 |
17 #include "base/scoped_ptr.h" | 17 #include "base/scoped_ptr.h" |
18 #include "base/scoped_comptr_win.h" | 18 #include "base/scoped_comptr_win.h" |
19 #include "base/thread.h" | 19 #include "base/thread.h" |
20 | 20 |
21 #include "chrome_frame/chrome_frame_activex_base.h" | 21 #include "chrome_frame/chrome_frame_activex_base.h" |
22 #include "chrome_frame/com_type_info_holder.h" | 22 #include "chrome_frame/com_type_info_holder.h" |
23 #include "chrome_frame/find_dialog.h" | 23 #include "chrome_frame/find_dialog.h" |
24 #include "chrome_frame/html_private_window_impl.h" | 24 #include "chrome_frame/html_private_window_impl.h" |
25 #include "chrome_frame/html_window_impl.h" | 25 #include "chrome_frame/html_window_impl.h" |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 void OnViewSource(); | 375 void OnViewSource(); |
376 void OnDetermineSecurityZone(const GUID* cmd_group_guid, DWORD command_id, | 376 void OnDetermineSecurityZone(const GUID* cmd_group_guid, DWORD command_id, |
377 DWORD cmd_exec_opt, VARIANT* in_args, | 377 DWORD cmd_exec_opt, VARIANT* in_args, |
378 VARIANT* out_args); | 378 VARIANT* out_args); |
379 void OnDisplayPrivacyInfo(); | 379 void OnDisplayPrivacyInfo(); |
380 | 380 |
381 // Call exec on our site's command target | 381 // Call exec on our site's command target |
382 HRESULT IEExec(const GUID* cmd_group_guid, DWORD command_id, | 382 HRESULT IEExec(const GUID* cmd_group_guid, DWORD command_id, |
383 DWORD cmd_exec_opt, VARIANT* in_args, VARIANT* out_args); | 383 DWORD cmd_exec_opt, VARIANT* in_args, VARIANT* out_args); |
384 | 384 |
385 DWORD MapUrlToZone(const wchar_t* url); | |
386 | |
387 // Parses the URL and returns information whether it is a new navigation and | |
388 // the actual url after stripping out the cf: prefix if any. | |
389 // This function also checks if the url scheme is valid for navigation within | |
390 // chrome and whether it is a restricted URL as per IE settings. In either of | |
391 // these cases it returns false. | |
392 bool ParseUrl(const std::wstring& url, bool* is_new_navigation, | |
393 bool* is_chrome_protocol, std::wstring* parsed_url); | |
394 | |
395 // Initiates navigation to the URL passed in. | 385 // Initiates navigation to the URL passed in. |
396 // Returns true on success. | 386 // Returns true on success. |
397 bool LaunchUrl(const std::wstring& url, const std::string& referrer, | 387 bool LaunchUrl(const ChromeFrameUrl& cf_url, const std::string& referrer); |
398 bool is_new_navigation); | |
399 | 388 |
400 // Handler to set the page font size in Chrome. | 389 // Handler to set the page font size in Chrome. |
401 HRESULT SetPageFontSize(const GUID* cmd_group_guid, | 390 HRESULT SetPageFontSize(const GUID* cmd_group_guid, |
402 DWORD command_id, | 391 DWORD command_id, |
403 DWORD cmd_exec_opt, | 392 DWORD cmd_exec_opt, |
404 VARIANT* in_args, | 393 VARIANT* in_args, |
405 VARIANT* out_args); | 394 VARIANT* out_args); |
406 | 395 |
407 // IOleCommandTarget handler for page refresh command | 396 // IOleCommandTarget handler for page refresh command |
408 HRESULT OnRefreshPage(const GUID* cmd_group_guid, DWORD command_id, | 397 HRESULT OnRefreshPage(const GUID* cmd_group_guid, DWORD command_id, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 | 453 |
465 // Contains privacy data retrieved from the UrlmonUrlRequestManager. This | 454 // Contains privacy data retrieved from the UrlmonUrlRequestManager. This |
466 // is used to return privacy data in response to the View->Privacy policy | 455 // is used to return privacy data in response to the View->Privacy policy |
467 // command. | 456 // command. |
468 UrlmonUrlRequestManager::PrivacyInfo privacy_info_; | 457 UrlmonUrlRequestManager::PrivacyInfo privacy_info_; |
469 UrlmonUrlRequestManager::PrivacyInfo::PrivacyRecords::iterator | 458 UrlmonUrlRequestManager::PrivacyInfo::PrivacyRecords::iterator |
470 next_privacy_record_; | 459 next_privacy_record_; |
471 | 460 |
472 // Dimensions of the window. Used only when opening popups. | 461 // Dimensions of the window. Used only when opening popups. |
473 gfx::Rect dimensions_; | 462 gfx::Rect dimensions_; |
474 // Set to true if the document was loaded by a window.open in chrome. | |
475 bool is_new_navigation_; | |
476 public: | 463 public: |
477 ScopedComPtr<IOleInPlaceFrame> in_place_frame_; | 464 ScopedComPtr<IOleInPlaceFrame> in_place_frame_; |
478 OLEINPLACEFRAMEINFO frame_info_; | 465 OLEINPLACEFRAMEINFO frame_info_; |
479 }; | 466 }; |
480 | 467 |
481 #endif // CHROME_FRAME_CHROME_ACTIVE_DOCUMENT_H_ | 468 #endif // CHROME_FRAME_CHROME_ACTIVE_DOCUMENT_H_ |
OLD | NEW |