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

Side by Side Diff: chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc

Issue 10824241: Really ignore events for replacement content in the webnavigation api (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/api/web_navigation/web_navigation_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/extensions/api/web_navigation/frame_navigation_state.h" 5 #include "chrome/browser/extensions/api/web_navigation/frame_navigation_state.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/common/url_constants.h" 8 #include "chrome/common/url_constants.h"
9 9
10 namespace extensions { 10 namespace extensions {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 frame_state.is_committed = false; 100 frame_state.is_committed = false;
101 frame_state.is_server_redirected = false; 101 frame_state.is_server_redirected = false;
102 frame_ids_.insert(frame_id); 102 frame_ids_.insert(frame_id);
103 } 103 }
104 104
105 void FrameNavigationState::StopTrackingFramesInRVH( 105 void FrameNavigationState::StopTrackingFramesInRVH(
106 content::RenderViewHost* render_view_host, 106 content::RenderViewHost* render_view_host,
107 FrameID id_to_skip) { 107 FrameID id_to_skip) {
108 for (std::set<FrameID>::iterator frame = frame_ids_.begin(); 108 for (std::set<FrameID>::iterator frame = frame_ids_.begin();
109 frame != frame_ids_.end();) { 109 frame != frame_ids_.end();) {
110 if (frame->render_view_host != render_view_host || 110 if (frame->render_view_host != render_view_host || *frame == id_to_skip) {
111 *frame == id_to_skip) {
112 ++frame; 111 ++frame;
113 continue; 112 continue;
114 } 113 }
115 FrameID frame_id = *frame; 114 FrameID frame_id = *frame;
116 ++frame; 115 ++frame;
117 if (frame_id == main_frame_id_) 116 if (frame_id == main_frame_id_)
118 main_frame_id_ = FrameID(); 117 main_frame_id_ = FrameID();
119 frame_state_map_.erase(frame_id); 118 frame_state_map_.erase(frame_id);
120 frame_ids_.erase(frame_id); 119 frame_ids_.erase(frame_id);
121 } 120 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } 200 }
202 201
203 bool FrameNavigationState::GetIsServerRedirected(FrameID frame_id) const { 202 bool FrameNavigationState::GetIsServerRedirected(FrameID frame_id) const {
204 FrameIdToStateMap::const_iterator frame_state = 203 FrameIdToStateMap::const_iterator frame_state =
205 frame_state_map_.find(frame_id); 204 frame_state_map_.find(frame_id);
206 return (frame_state != frame_state_map_.end() && 205 return (frame_state != frame_state_map_.end() &&
207 frame_state->second.is_server_redirected); 206 frame_state->second.is_server_redirected);
208 } 207 }
209 208
210 } // namespace extensions 209 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/web_navigation/web_navigation_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698