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

Side by Side Diff: chrome/browser/ui/panels/panel_window_controller_cocoa.mm

Issue 9546001: Support detaching/attaching panels via inter-strip drags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback Created 8 years, 9 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
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/panels/panel_window_controller_cocoa.h" 5 #include "chrome/browser/ui/panels/panel_window_controller_cocoa.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/bundle_locations.h" 10 #include "base/mac/bundle_locations.h"
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 } 639 }
640 640
641 - (BOOL)canBecomeKeyWindow { 641 - (BOOL)canBecomeKeyWindow {
642 // Panel can only gain focus if it is expanded. Minimized panels do not 642 // Panel can only gain focus if it is expanded. Minimized panels do not
643 // participate in Cmd-~ rotation. 643 // participate in Cmd-~ rotation.
644 // TODO(dimich): If it will be ever desired to expand/focus the Panel on 644 // TODO(dimich): If it will be ever desired to expand/focus the Panel on
645 // keyboard navigation or via main menu, the care should be taken to avoid 645 // keyboard navigation or via main menu, the care should be taken to avoid
646 // cases when minimized Panel is getting keyboard input, invisibly. 646 // cases when minimized Panel is getting keyboard input, invisibly.
647 return windowShim_->panel()->expansion_state() == Panel::EXPANDED; 647 return windowShim_->panel()->expansion_state() == Panel::EXPANDED;
648 } 648 }
649
650 - (void)setAlwaysOnTop:(bool)onTop {
651 NSWindow* window = [self window];
652 [window setLevel:(onTop ? NSStatusWindowLevel : NSNormalWindowLevel)];
653 }
649 @end 654 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698