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

Side by Side Diff: apps/app_window_contents.cc

Issue 26427002: Add always-on-top property to app windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 7 years, 2 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 | « no previous file | apps/shell_window.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 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 app_window::Bounds update; 85 app_window::Bounds update;
86 update.left.reset(new int(bounds.x())); 86 update.left.reset(new int(bounds.x()));
87 update.top.reset(new int(bounds.y())); 87 update.top.reset(new int(bounds.y()));
88 update.width.reset(new int(bounds.width())); 88 update.width.reset(new int(bounds.width()));
89 update.height.reset(new int(bounds.height())); 89 update.height.reset(new int(bounds.height()));
90 dictionary->Set("bounds", update.ToValue().release()); 90 dictionary->Set("bounds", update.ToValue().release());
91 dictionary->SetBoolean("fullscreen", 91 dictionary->SetBoolean("fullscreen",
92 native_app_window->IsFullscreenOrPending()); 92 native_app_window->IsFullscreenOrPending());
93 dictionary->SetBoolean("minimized", native_app_window->IsMinimized()); 93 dictionary->SetBoolean("minimized", native_app_window->IsMinimized());
94 dictionary->SetBoolean("maximized", native_app_window->IsMaximized()); 94 dictionary->SetBoolean("maximized", native_app_window->IsMaximized());
95 dictionary->SetBoolean("alwaysOnTop", native_app_window->IsAlwaysOnTop());
95 96
96 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost(); 97 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost();
97 rvh->Send(new ExtensionMsg_MessageInvoke(rvh->GetRoutingID(), 98 rvh->Send(new ExtensionMsg_MessageInvoke(rvh->GetRoutingID(),
98 host_->extension_id(), 99 host_->extension_id(),
99 "app.window", 100 "app.window",
100 "updateAppWindowProperties", 101 "updateAppWindowProperties",
101 args, 102 args,
102 false)); 103 false));
103 } 104 }
104 105
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 content::RenderViewHost* rvh) { 168 content::RenderViewHost* rvh) {
168 DCHECK(rvh); 169 DCHECK(rvh);
169 content::BrowserThread::PostTask( 170 content::BrowserThread::PostTask(
170 content::BrowserThread::IO, FROM_HERE, 171 content::BrowserThread::IO, FROM_HERE,
171 base::Bind(&content::ResourceDispatcherHost::BlockRequestsForRoute, 172 base::Bind(&content::ResourceDispatcherHost::BlockRequestsForRoute,
172 base::Unretained(content::ResourceDispatcherHost::Get()), 173 base::Unretained(content::ResourceDispatcherHost::Get()),
173 rvh->GetProcess()->GetID(), rvh->GetRoutingID())); 174 rvh->GetProcess()->GetID(), rvh->GetRoutingID()));
174 } 175 }
175 176
176 } // namespace apps 177 } // namespace apps
OLDNEW
« no previous file with comments | « no previous file | apps/shell_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698