Add CefBrowser::ReloadIgnoreCache() method and MENU_ID_NAV_RELOAD_NOCACHE menu support. (issue #118).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@107 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2010-09-23 16:05:10 +00:00
parent de51597b22
commit 4fd793f802
10 changed files with 55 additions and 16 deletions

View File

@@ -62,7 +62,7 @@ void BrowserNavigationController::Reset() {
last_committed_entry_index_ = -1;
}
void BrowserNavigationController::Reload() {
void BrowserNavigationController::Reload(bool ignoreCache) {
// Base the navigation on where we are now...
int current_index = GetCurrentEntryIndex();
@@ -74,7 +74,7 @@ void BrowserNavigationController::Reload() {
DiscardPendingEntry();
pending_entry_index_ = current_index;
NavigateToPendingEntry(true);
NavigateToPendingEntry(true, ignoreCache);
}
void BrowserNavigationController::GoToOffset(int offset) {
@@ -92,7 +92,7 @@ void BrowserNavigationController::GoToIndex(int index) {
DiscardPendingEntry();
pending_entry_index_ = index;
NavigateToPendingEntry(false);
NavigateToPendingEntry(false, false);
}
void BrowserNavigationController::LoadEntry(BrowserNavigationEntry* entry) {
@@ -101,7 +101,7 @@ void BrowserNavigationController::LoadEntry(BrowserNavigationEntry* entry) {
// result in a download or a 'no content' response (e.g., a mailto: URL).
DiscardPendingEntry();
pending_entry_ = entry;
NavigateToPendingEntry(false);
NavigateToPendingEntry(false, false);
}
@@ -218,14 +218,14 @@ int BrowserNavigationController::GetEntryIndexWithPageID(int32 page_id) const {
return -1;
}
void BrowserNavigationController::NavigateToPendingEntry(bool reload) {
void BrowserNavigationController::NavigateToPendingEntry(bool reload, bool ignoreCache) {
// For session history navigations only the pending_entry_index_ is set.
if (!pending_entry_) {
DCHECK(pending_entry_index_ != -1);
pending_entry_ = entries_[pending_entry_index_].get();
}
if (browser_->UIT_Navigate(*pending_entry_, reload)) {
if (browser_->UIT_Navigate(*pending_entry_, reload, ignoreCache)) {
// Note: this is redundant if navigation completed synchronously because
// DidNavigateToEntry call this as well.
UpdateMaxPageID();