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

Side by Side Diff: apps/app_window_contents.cc

Issue 306823002: Flip --enable-apps-show-on-first-paint flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tests Created 6 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 | Annotate | Revision Log
« no previous file with comments | « apps/app_window_contents.h ('k') | chrome/app/generated_resources.grd » ('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 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 "apps/app_window_contents.h" 5 #include "apps/app_window_contents.h"
6 6
7 #include "apps/ui/native_app_window.h" 7 #include "apps/ui/native_app_window.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/common/extensions/api/app_window.h" 9 #include "chrome/common/extensions/api/app_window.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 "updateAppWindowProperties", 88 "updateAppWindowProperties",
89 args, 89 args,
90 false)); 90 false));
91 } 91 }
92 92
93 void AppWindowContentsImpl::NativeWindowClosed() { 93 void AppWindowContentsImpl::NativeWindowClosed() {
94 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost(); 94 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost();
95 rvh->Send(new ExtensionMsg_AppWindowClosed(rvh->GetRoutingID())); 95 rvh->Send(new ExtensionMsg_AppWindowClosed(rvh->GetRoutingID()));
96 } 96 }
97 97
98 void AppWindowContentsImpl::NativeWindowFirstShown() const {
99 base::ListValue args;
100 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost();
101 rvh->Send(new ExtensionMsg_MessageInvoke(rvh->GetRoutingID(),
102 host_->extension_id(),
103 "app.window",
104 "appWindowFirstShown",
105 args,
106 false));
107 }
108
98 content::WebContents* AppWindowContentsImpl::GetWebContents() const { 109 content::WebContents* AppWindowContentsImpl::GetWebContents() const {
99 return web_contents_.get(); 110 return web_contents_.get();
100 } 111 }
101 112
102 void AppWindowContentsImpl::Observe( 113 void AppWindowContentsImpl::Observe(
103 int type, 114 int type,
104 const content::NotificationSource& source, 115 const content::NotificationSource& source,
105 const content::NotificationDetails& details) { 116 const content::NotificationDetails& details) {
106 switch (type) { 117 switch (type) {
107 case content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED: { 118 case content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED: {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 content::RenderViewHost* rvh) { 166 content::RenderViewHost* rvh) {
156 DCHECK(rvh); 167 DCHECK(rvh);
157 content::BrowserThread::PostTask( 168 content::BrowserThread::PostTask(
158 content::BrowserThread::IO, FROM_HERE, 169 content::BrowserThread::IO, FROM_HERE,
159 base::Bind(&content::ResourceDispatcherHost::BlockRequestsForRoute, 170 base::Bind(&content::ResourceDispatcherHost::BlockRequestsForRoute,
160 base::Unretained(content::ResourceDispatcherHost::Get()), 171 base::Unretained(content::ResourceDispatcherHost::Get()),
161 rvh->GetProcess()->GetID(), rvh->GetRoutingID())); 172 rvh->GetProcess()->GetID(), rvh->GetRoutingID()));
162 } 173 }
163 174
164 } // namespace apps 175 } // namespace apps
OLDNEW
« no previous file with comments | « apps/app_window_contents.h ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698