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

Side by Side Diff: extensions/browser/app_window/app_window_contents.cc

Issue 2553263002: Remove code to defer app window appearance until first paint. (Closed)
Patch Set: nit Created 4 years 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "extensions/browser/app_window/app_window_contents.h" 5 #include "extensions/browser/app_window/app_window_contents.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 rfh->Send(new ExtensionMsg_MessageInvoke(rfh->GetRoutingID(), 75 rfh->Send(new ExtensionMsg_MessageInvoke(rfh->GetRoutingID(),
76 host_->extension_id(), "app.window", 76 host_->extension_id(), "app.window",
77 "updateAppWindowProperties", args)); 77 "updateAppWindowProperties", args));
78 } 78 }
79 79
80 void AppWindowContentsImpl::NativeWindowClosed() { 80 void AppWindowContentsImpl::NativeWindowClosed() {
81 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost(); 81 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost();
82 rvh->Send(new ExtensionMsg_AppWindowClosed(rvh->GetRoutingID())); 82 rvh->Send(new ExtensionMsg_AppWindowClosed(rvh->GetRoutingID()));
83 } 83 }
84 84
85 void AppWindowContentsImpl::DispatchWindowShownForTests() const {
86 base::ListValue args;
87 content::RenderFrameHost* rfh = web_contents_->GetMainFrame();
88 rfh->Send(new ExtensionMsg_MessageInvoke(rfh->GetRoutingID(),
89 host_->extension_id(), "app.window",
90 "appWindowShownForTests", args));
91 }
92
93 void AppWindowContentsImpl::OnWindowReady() { 85 void AppWindowContentsImpl::OnWindowReady() {
94 is_window_ready_ = true; 86 is_window_ready_ = true;
95 if (is_blocking_requests_) { 87 if (is_blocking_requests_) {
96 is_blocking_requests_ = false; 88 is_blocking_requests_ = false;
97 content::ResourceDispatcherHost::ResumeBlockedRequestsForFrameFromUI( 89 content::ResourceDispatcherHost::ResumeBlockedRequestsForFrameFromUI(
98 web_contents_->GetMainFrame()); 90 web_contents_->GetMainFrame());
99 } 91 }
100 } 92 }
101 93
102 content::WebContents* AppWindowContentsImpl::GetWebContents() const { 94 content::WebContents* AppWindowContentsImpl::GetWebContents() const {
(...skipping 29 matching lines...) Expand all
132 content::RenderFrameHost* rfh) { 124 content::RenderFrameHost* rfh) {
133 DCHECK(rfh); 125 DCHECK(rfh);
134 // Don't bother blocking requests if the renderer side is already good to go. 126 // Don't bother blocking requests if the renderer side is already good to go.
135 if (is_window_ready_) 127 if (is_window_ready_)
136 return; 128 return;
137 is_blocking_requests_ = true; 129 is_blocking_requests_ = true;
138 content::ResourceDispatcherHost::BlockRequestsForFrameFromUI(rfh); 130 content::ResourceDispatcherHost::BlockRequestsForFrameFromUI(rfh);
139 } 131 }
140 132
141 } // namespace extensions 133 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/app_window/app_window_contents.h ('k') | extensions/browser/app_window/test_app_window_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698