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

Side by Side Diff: chrome/renderer/frame_sniffer.cc

Issue 8341037: Added logic that will retry to reload+reconnect the mobile payment portal page 5 times before it ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | « chrome/renderer/frame_sniffer.h ('k') | no next file » | 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) 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 #include "chrome/renderer/frame_sniffer.h" 5 #include "chrome/renderer/frame_sniffer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/common/render_messages.h" 8 #include "chrome/common/render_messages.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h"
11 11
12 FrameSniffer::FrameSniffer(content::RenderView* render_view, 12 FrameSniffer::FrameSniffer(content::RenderView* render_view,
13 const string16 &frame_name) 13 const string16 &frame_name)
14 : content::RenderViewObserver(render_view), frame_name_(frame_name) { 14 : content::RenderViewObserver(render_view), frame_name_(frame_name) {
15 } 15 }
16 16
17 FrameSniffer::~FrameSniffer() { 17 FrameSniffer::~FrameSniffer() {
18 } 18 }
19 19
20 void FrameSniffer::DidFailProvisionalLoad(WebKit::WebFrame* frame, 20 void FrameSniffer::DidFailProvisionalLoad(WebKit::WebFrame* frame,
21 const WebKit::WebURLError& error) { 21 const WebKit::WebURLError& error) {
22 if (!ShouldSniffFrame(frame)) 22 if (!ShouldSniffFrame(frame))
23 return; 23 return;
24 Send(new ChromeViewHostMsg_FrameLoadingError(routing_id(), -error.reason)); 24 Send(new ChromeViewHostMsg_FrameLoadingError(routing_id(), -error.reason));
25 } 25 }
26 26
27 void FrameSniffer::DidCommitProvisionalLoad(WebKit::WebFrame* frame,
28 bool is_new_navigation) {
29 if (!ShouldSniffFrame(frame))
30 return;
31 Send(new ChromeViewHostMsg_FrameLoadingCompleted(routing_id()));
32 }
33
27 bool FrameSniffer::ShouldSniffFrame(WebKit::WebFrame* frame) { 34 bool FrameSniffer::ShouldSniffFrame(WebKit::WebFrame* frame) {
28 return frame->name() == frame_name_; 35 return frame->name() == frame_name_;
29 } 36 }
OLDNEW
« no previous file with comments | « chrome/renderer/frame_sniffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698