OLD | NEW |
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 "chrome/browser/extensions/app_window_contents.h" | 5 #include "chrome/browser/extensions/app_window_contents.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/ui/extensions/native_app_window.h" | 8 #include "chrome/browser/ui/extensions/native_app_window.h" |
9 #include "chrome/common/chrome_notification_types.h" | 9 #include "chrome/common/chrome_notification_types.h" |
10 #include "chrome/common/extensions/api/app_window.h" | 10 #include "chrome/common/extensions/api/app_window.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 dictionary->SetBoolean("fullscreen", | 90 dictionary->SetBoolean("fullscreen", |
91 native_app_window->IsFullscreenOrPending()); | 91 native_app_window->IsFullscreenOrPending()); |
92 dictionary->SetBoolean("minimized", native_app_window->IsMinimized()); | 92 dictionary->SetBoolean("minimized", native_app_window->IsMinimized()); |
93 dictionary->SetBoolean("maximized", native_app_window->IsMaximized()); | 93 dictionary->SetBoolean("maximized", native_app_window->IsMaximized()); |
94 | 94 |
95 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost(); | 95 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost(); |
96 rvh->Send(new ExtensionMsg_MessageInvoke(rvh->GetRoutingID(), | 96 rvh->Send(new ExtensionMsg_MessageInvoke(rvh->GetRoutingID(), |
97 host_->extension()->id(), | 97 host_->extension()->id(), |
98 "updateAppWindowProperties", | 98 "updateAppWindowProperties", |
99 args, | 99 args, |
100 GURL(), | |
101 false)); | 100 false)); |
102 | |
103 } | 101 } |
104 | 102 |
105 void AppWindowContents::NativeWindowClosed() { | 103 void AppWindowContents::NativeWindowClosed() { |
106 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost(); | 104 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost(); |
107 rvh->Send(new ExtensionMsg_AppWindowClosed(rvh->GetRoutingID())); | 105 rvh->Send(new ExtensionMsg_AppWindowClosed(rvh->GetRoutingID())); |
108 } | 106 } |
109 | 107 |
110 content::WebContents* AppWindowContents::GetWebContents() const { | 108 content::WebContents* AppWindowContents::GetWebContents() const { |
111 return web_contents_.get(); | 109 return web_contents_.get(); |
112 } | 110 } |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 163 |
166 void AppWindowContents::SuspendRenderViewHost( | 164 void AppWindowContents::SuspendRenderViewHost( |
167 content::RenderViewHost* rvh) { | 165 content::RenderViewHost* rvh) { |
168 DCHECK(rvh); | 166 DCHECK(rvh); |
169 content::BrowserThread::PostTask( | 167 content::BrowserThread::PostTask( |
170 content::BrowserThread::IO, FROM_HERE, | 168 content::BrowserThread::IO, FROM_HERE, |
171 base::Bind(&content::ResourceDispatcherHost::BlockRequestsForRoute, | 169 base::Bind(&content::ResourceDispatcherHost::BlockRequestsForRoute, |
172 base::Unretained(content::ResourceDispatcherHost::Get()), | 170 base::Unretained(content::ResourceDispatcherHost::Get()), |
173 rvh->GetProcess()->GetID(), rvh->GetRoutingID())); | 171 rvh->GetProcess()->GetID(), rvh->GetRoutingID())); |
174 } | 172 } |
OLD | NEW |