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 // Implementation of ChromeActiveDocument | 5 // Implementation of ChromeActiveDocument |
6 #include "chrome_frame/chrome_active_document.h" | 6 #include "chrome_frame/chrome_active_document.h" |
7 | 7 |
8 #include <hlink.h> | 8 #include <hlink.h> |
9 #include <htiface.h> | 9 #include <htiface.h> |
10 #include <initguid.h> | 10 #include <initguid.h> |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 #undef DEFINE_ENCODING_ID_ARRAY | 59 #undef DEFINE_ENCODING_ID_ARRAY |
60 0 // The Last data must be 0 to indicate the end of the encoding id array. | 60 0 // The Last data must be 0 to indicate the end of the encoding id array. |
61 }; | 61 }; |
62 | 62 |
63 ChromeActiveDocument::ChromeActiveDocument() | 63 ChromeActiveDocument::ChromeActiveDocument() |
64 : navigation_info_(new NavigationInfo()), | 64 : navigation_info_(new NavigationInfo()), |
65 first_navigation_(true), | 65 first_navigation_(true), |
66 is_automation_client_reused_(false), | 66 is_automation_client_reused_(false), |
67 popup_allowed_(false), | 67 popup_allowed_(false), |
68 accelerator_table_(NULL) { | 68 accelerator_table_(NULL) { |
69 TRACE_EVENT_BEGIN("chromeframe.createactivedocument", this, ""); | 69 TRACE_EVENT_BEGIN_ETW("chromeframe.createactivedocument", this, ""); |
70 | 70 |
71 url_fetcher_->set_frame_busting(false); | 71 url_fetcher_->set_frame_busting(false); |
72 memset(navigation_info_.get(), 0, sizeof(NavigationInfo)); | 72 memset(navigation_info_.get(), 0, sizeof(NavigationInfo)); |
73 } | 73 } |
74 | 74 |
75 HRESULT ChromeActiveDocument::FinalConstruct() { | 75 HRESULT ChromeActiveDocument::FinalConstruct() { |
76 // If we have a cached ChromeActiveDocument instance in TLS, then grab | 76 // If we have a cached ChromeActiveDocument instance in TLS, then grab |
77 // ownership of the cached document's automation client. This is an | 77 // ownership of the cached document's automation client. This is an |
78 // optimization to get Chrome active documents to load faster. | 78 // optimization to get Chrome active documents to load faster. |
79 ChromeActiveDocument* cached_document = g_active_doc_cache.Get(); | 79 ChromeActiveDocument* cached_document = g_active_doc_cache.Get(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 return S_OK; | 126 return S_OK; |
127 } | 127 } |
128 | 128 |
129 ChromeActiveDocument::~ChromeActiveDocument() { | 129 ChromeActiveDocument::~ChromeActiveDocument() { |
130 DVLOG(1) << __FUNCTION__; | 130 DVLOG(1) << __FUNCTION__; |
131 if (find_dialog_.IsWindow()) | 131 if (find_dialog_.IsWindow()) |
132 find_dialog_.DestroyWindow(); | 132 find_dialog_.DestroyWindow(); |
133 // ChromeFramePlugin | 133 // ChromeFramePlugin |
134 BaseActiveX::Uninitialize(); | 134 BaseActiveX::Uninitialize(); |
135 | 135 |
136 TRACE_EVENT_END("chromeframe.createactivedocument", this, ""); | 136 TRACE_EVENT_END_ETW("chromeframe.createactivedocument", this, ""); |
137 } | 137 } |
138 | 138 |
139 // Override DoVerb | 139 // Override DoVerb |
140 STDMETHODIMP ChromeActiveDocument::DoVerb(LONG verb, | 140 STDMETHODIMP ChromeActiveDocument::DoVerb(LONG verb, |
141 LPMSG msg, | 141 LPMSG msg, |
142 IOleClientSite* active_site, | 142 IOleClientSite* active_site, |
143 LONG index, | 143 LONG index, |
144 HWND parent_window, | 144 HWND parent_window, |
145 LPCRECT pos) { | 145 LPCRECT pos) { |
146 // IE will try and in-place activate us in some cases. This happens when | 146 // IE will try and in-place activate us in some cases. This happens when |
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 return true; | 1401 return true; |
1402 | 1402 |
1403 if (new_navigation_info.url != navigation_info_->url) | 1403 if (new_navigation_info.url != navigation_info_->url) |
1404 return true; | 1404 return true; |
1405 | 1405 |
1406 if (new_navigation_info.referrer != navigation_info_->referrer) | 1406 if (new_navigation_info.referrer != navigation_info_->referrer) |
1407 return true; | 1407 return true; |
1408 | 1408 |
1409 return false; | 1409 return false; |
1410 } | 1410 } |
OLD | NEW |