Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4506)

Unified Diff: chrome_frame/chrome_active_document.cc

Issue 6458004: Remove includes of message headers in headers. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/chrome_active_document.h ('k') | chrome_frame/chrome_frame.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/chrome_active_document.cc
===================================================================
--- chrome_frame/chrome_active_document.cc (revision 74235)
+++ chrome_frame/chrome_active_document.cc (working copy)
@@ -34,6 +34,7 @@
#include "chrome/app/chrome_command_ids.h"
#include "chrome/app/chrome_dll_resource.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+#include "chrome/common/automation_messages.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/navigation_types.h"
#include "chrome/common/page_zoom.h"
@@ -60,14 +61,15 @@
};
ChromeActiveDocument::ChromeActiveDocument()
- : first_navigation_(true),
+ : navigation_info_(new NavigationInfo()),
+ first_navigation_(true),
is_automation_client_reused_(false),
popup_allowed_(false),
accelerator_table_(NULL) {
TRACE_EVENT_BEGIN("chromeframe.createactivedocument", this, "");
url_fetcher_->set_frame_busting(false);
- memset(&navigation_info_, 0, sizeof(navigation_info_));
+ memset(navigation_info_.get(), 0, sizeof(NavigationInfo));
}
HRESULT ChromeActiveDocument::FinalConstruct() {
@@ -431,7 +433,7 @@
LARGE_INTEGER offset = {0};
ULARGE_INTEGER new_pos = {0};
DWORD written = 0;
- std::wstring url = UTF8ToWide(navigation_info_.url.spec());
+ std::wstring url = UTF8ToWide(navigation_info_->url.spec());
return stream->Write(url.c_str(), (url.length() + 1) * sizeof(wchar_t),
&written);
}
@@ -439,7 +441,7 @@
STDMETHODIMP ChromeActiveDocument::SetPositionCookie(DWORD position_cookie) {
if (automation_client_.get()) {
int index = static_cast<int>(position_cookie);
- navigation_info_.navigation_index = index;
+ navigation_info_->navigation_index = index;
automation_client_->NavigateToIndex(index);
} else {
DLOG(WARNING) << "Invalid automation client instance";
@@ -451,7 +453,7 @@
if (!position_cookie)
return E_INVALIDARG;
- *position_cookie = navigation_info_.navigation_index;
+ *position_cookie = navigation_info_->navigation_index;
return S_OK;
}
@@ -710,12 +712,14 @@
void ChromeActiveDocument::UpdateNavigationState(
const NavigationInfo& new_navigation_info, int flags) {
HRESULT hr = S_OK;
- bool is_title_changed = (navigation_info_.title != new_navigation_info.title);
+ bool is_title_changed =
+ (navigation_info_->title != new_navigation_info.title);
bool is_ssl_state_changed =
- (navigation_info_.security_style != new_navigation_info.security_style) ||
- (navigation_info_.displayed_insecure_content !=
+ (navigation_info_->security_style !=
+ new_navigation_info.security_style) ||
+ (navigation_info_->displayed_insecure_content !=
new_navigation_info.displayed_insecure_content) ||
- (navigation_info_.ran_insecure_content !=
+ (navigation_info_->ran_insecure_content !=
new_navigation_info.ran_insecure_content);
if (is_ssl_state_changed) {
@@ -834,7 +838,7 @@
// finalized the travel log. This is because IE will ask for information
// such as navigation index when the travel log is finalized and we need
// supply the old index and not the new one.
- navigation_info_ = new_navigation_info;
+ *navigation_info_ = new_navigation_info;
// Update the IE zone here. Ideally we would like to do it when the active
// document is activated. However that does not work at times as the frame we
// get there is not the actual frame which handles the command.
@@ -852,9 +856,9 @@
}
void ChromeActiveDocument::OnViewSource() {
- DCHECK(navigation_info_.url.is_valid());
+ DCHECK(navigation_info_->url.is_valid());
HostNavigate(GURL(chrome::kViewSourceScheme + std::string(":") +
- navigation_info_.url.spec()), GURL(), NEW_WINDOW);
+ navigation_info_->url.spec()), GURL(), NEW_WINDOW);
}
void ChromeActiveDocument::OnDetermineSecurityZone(const GUID* cmd_group_guid,
@@ -1125,10 +1129,10 @@
ResetUrlRequestManager();
url_fetcher_->set_frame_busting(false);
// And now launch the current URL again. This starts a new server process.
- DCHECK(navigation_info_.url.is_valid());
+ DCHECK(navigation_info_->url.is_valid());
ChromeFrameUrl cf_url;
- cf_url.Parse(UTF8ToWide(navigation_info_.url.spec()));
- LaunchUrl(cf_url, navigation_info_.referrer.spec());
+ cf_url.Parse(UTF8ToWide(navigation_info_->url.spec()));
+ LaunchUrl(cf_url, navigation_info_->referrer.spec());
}
return S_OK;
@@ -1383,16 +1387,16 @@
return false;
if (new_navigation_info.navigation_index ==
- navigation_info_.navigation_index)
+ navigation_info_->navigation_index)
return false;
- if (new_navigation_info.navigation_type != navigation_info_.navigation_type)
+ if (new_navigation_info.navigation_type != navigation_info_->navigation_type)
return true;
- if (new_navigation_info.url != navigation_info_.url)
+ if (new_navigation_info.url != navigation_info_->url)
return true;
- if (new_navigation_info.referrer != navigation_info_.referrer)
+ if (new_navigation_info.referrer != navigation_info_->referrer)
return true;
return false;
« no previous file with comments | « chrome_frame/chrome_active_document.h ('k') | chrome_frame/chrome_frame.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698