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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/cocoa/browser_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } else { 252 } else {
253 [NSApp cancelUserAttentionRequest:attention_request_id_]; 253 [NSApp cancelUserAttentionRequest:attention_request_id_];
254 attention_request_id_ = 0; 254 attention_request_id_ = 0;
255 } 255 }
256 } 256 }
257 257
258 bool BrowserWindowCocoa::IsAlwaysOnTop() const { 258 bool BrowserWindowCocoa::IsAlwaysOnTop() const {
259 return false; 259 return false;
260 } 260 }
261 261
262 void BrowserWindowCocoa::SetAlwaysOnTop(bool always_on_top) {
263 // Not implemented for browser windows.
264 NOTIMPLEMENTED();
265 }
266
262 bool BrowserWindowCocoa::IsActive() const { 267 bool BrowserWindowCocoa::IsActive() const {
263 return [window() isKeyWindow]; 268 return [window() isKeyWindow];
264 } 269 }
265 270
266 gfx::NativeWindow BrowserWindowCocoa::GetNativeWindow() { 271 gfx::NativeWindow BrowserWindowCocoa::GetNativeWindow() {
267 return window(); 272 return window();
268 } 273 }
269 274
270 BrowserWindowTesting* BrowserWindowCocoa::GetBrowserWindowTesting() { 275 BrowserWindowTesting* BrowserWindowCocoa::GetBrowserWindowTesting() {
271 return NULL; 276 return NULL;
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 // further, both by another H, i.e. WebContentsView's height becomes 778 // further, both by another H, i.e. WebContentsView's height becomes
774 // A.height() + H and RenderWidgetHostView's height becomes A.height() + 2H. 779 // A.height() + H and RenderWidgetHostView's height becomes A.height() + 2H.
775 // Strangely, the RenderWidgetHostView for the previous navigation entry also 780 // Strangely, the RenderWidgetHostView for the previous navigation entry also
776 // gets enlarged by H. 781 // gets enlarged by H.
777 // I believe these "automatic" resizing are caused by setAutoresizingMask of 782 // I believe these "automatic" resizing are caused by setAutoresizingMask of
778 // of the cocoa view in WebContentsViewMac, which defeats the purpose of 783 // of the cocoa view in WebContentsViewMac, which defeats the purpose of
779 // WebContentsDelegate::GetSizeForNewRenderView i.e. to prevent resizing of 784 // WebContentsDelegate::GetSizeForNewRenderView i.e. to prevent resizing of
780 // RenderWidgetHostView in (2) and (3). 785 // RenderWidgetHostView in (2) and (3).
781 return 0; 786 return 0;
782 } 787 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.h ('k') | chrome/browser/ui/gtk/apps/native_app_window_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698