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

Side by Side Diff: blimp/engine/session/page_load_tracker.cc

Issue 2035543002: [Blimp] Creates engine tab class to handle tab related operations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « blimp/engine/session/blimp_engine_session.cc ('k') | blimp/engine/session/tab.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "blimp/engine/session/page_load_tracker.h" 5 #include "blimp/engine/session/page_load_tracker.h"
6 6
7 #include "content/public/browser/render_widget_host_view.h" 7 #include "content/public/browser/render_widget_host_view.h"
8 8
9 namespace blimp { 9 namespace blimp {
10 namespace engine { 10 namespace engine {
11 11
12 namespace { 12 namespace {
13 13
14 content::RenderWidgetHost* GetRenderWidgetHostIfMainFrame( 14 content::RenderWidgetHost* GetRenderWidgetHostIfMainFrame(
15 content::RenderFrameHost* render_frame_host) { 15 content::RenderFrameHost* render_frame_host) {
16 if (render_frame_host->GetParent() != nullptr) 16 if (render_frame_host->GetParent() != nullptr)
17 return nullptr; 17 return nullptr;
18 18
19 return render_frame_host->GetView()->GetRenderWidgetHost(); 19 return render_frame_host->GetView()->GetRenderWidgetHost();
20 } 20 }
21 21
22 } // namespace 22 } // namespace
23 23
24 PageLoadTracker::PageLoadTracker(content::WebContents* web_contents, 24 PageLoadTracker::PageLoadTracker(content::WebContents* web_contents,
25 PageLoadTrackerClient* client) 25 PageLoadTrackerClient* client)
26 : client_(client) { 26 : client_(client) {
27 DCHECK(web_contents);
27 Observe(web_contents); 28 Observe(web_contents);
28 } 29 }
29 30
30 PageLoadTracker::~PageLoadTracker() {} 31 PageLoadTracker::~PageLoadTracker() {}
31 32
32 void PageLoadTracker::DidStartProvisionalLoadForFrame( 33 void PageLoadTracker::DidStartProvisionalLoadForFrame(
33 content::RenderFrameHost* render_frame_host, 34 content::RenderFrameHost* render_frame_host,
34 const GURL& validated_url, 35 const GURL& validated_url,
35 bool is_error_page, 36 bool is_error_page,
36 bool is_iframe_srcdoc) { 37 bool is_iframe_srcdoc) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 render_widget_load_status_.erase(it); 95 render_widget_load_status_.erase(it);
95 } 96 }
96 } 97 }
97 98
98 bool PageLoadTracker::LoadStatus::Loaded() const { 99 bool PageLoadTracker::LoadStatus::Loaded() const {
99 return page_loaded && did_first_paint; 100 return page_loaded && did_first_paint;
100 } 101 }
101 102
102 } // namespace engine 103 } // namespace engine
103 } // namespace blimp 104 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/engine/session/blimp_engine_session.cc ('k') | blimp/engine/session/tab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698