Chromium Code Reviews| 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 "apps/app_window_contents.h" | 5 #include "apps/app_window_contents.h" |
| 6 | 6 |
| 7 #include "apps/native_app_window.h" | 7 #include "apps/native_app_window.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/common/extensions/api/app_window.h" | 10 #include "chrome/common/extensions/api/app_window.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 update.width.reset(new int(bounds.width())); | 89 update.width.reset(new int(bounds.width())); |
| 90 update.height.reset(new int(bounds.height())); | 90 update.height.reset(new int(bounds.height())); |
| 91 dictionary->Set("bounds", update.ToValue().release()); | 91 dictionary->Set("bounds", update.ToValue().release()); |
| 92 dictionary->SetBoolean("fullscreen", | 92 dictionary->SetBoolean("fullscreen", |
| 93 native_app_window->IsFullscreenOrPending()); | 93 native_app_window->IsFullscreenOrPending()); |
| 94 dictionary->SetBoolean("minimized", native_app_window->IsMinimized()); | 94 dictionary->SetBoolean("minimized", native_app_window->IsMinimized()); |
| 95 dictionary->SetBoolean("maximized", native_app_window->IsMaximized()); | 95 dictionary->SetBoolean("maximized", native_app_window->IsMaximized()); |
| 96 | 96 |
| 97 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost(); | 97 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost(); |
| 98 rvh->Send(new ExtensionMsg_MessageInvoke(rvh->GetRoutingID(), | 98 rvh->Send(new ExtensionMsg_MessageInvoke(rvh->GetRoutingID(), |
| 99 host_->extension()->id(), | 99 host_->extension_id(), |
|
benwells
2013/09/20 07:35:31
huh, I was just looking at this today due to https
tmdiep
2013/09/20 11:07:36
Darn, if I had waited a bit longer this could have
| |
| 100 "app.window", | 100 "app.window", |
| 101 "updateAppWindowProperties", | 101 "updateAppWindowProperties", |
| 102 args, | 102 args, |
| 103 false)); | 103 false)); |
| 104 } | 104 } |
| 105 | 105 |
| 106 void AppWindowContents::NativeWindowClosed() { | 106 void AppWindowContents::NativeWindowClosed() { |
| 107 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost(); | 107 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost(); |
| 108 rvh->Send(new ExtensionMsg_AppWindowClosed(rvh->GetRoutingID())); | 108 rvh->Send(new ExtensionMsg_AppWindowClosed(rvh->GetRoutingID())); |
| 109 } | 109 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 168 content::RenderViewHost* rvh) { | 168 content::RenderViewHost* rvh) { |
| 169 DCHECK(rvh); | 169 DCHECK(rvh); |
| 170 content::BrowserThread::PostTask( | 170 content::BrowserThread::PostTask( |
| 171 content::BrowserThread::IO, FROM_HERE, | 171 content::BrowserThread::IO, FROM_HERE, |
| 172 base::Bind(&content::ResourceDispatcherHost::BlockRequestsForRoute, | 172 base::Bind(&content::ResourceDispatcherHost::BlockRequestsForRoute, |
| 173 base::Unretained(content::ResourceDispatcherHost::Get()), | 173 base::Unretained(content::ResourceDispatcherHost::Get()), |
| 174 rvh->GetProcess()->GetID(), rvh->GetRoutingID())); | 174 rvh->GetProcess()->GetID(), rvh->GetRoutingID())); |
| 175 } | 175 } |
| 176 | 176 |
| 177 } // namespace apps | 177 } // namespace apps |
| OLD | NEW |