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

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

Issue 10180011: Support painting panels with chromium themes on GTK. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land Created 8 years, 7 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
« no previous file with comments | « chrome/browser/ui/panels/panel_window_controller_cocoa.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 Panel* panel = windowShim_->panel(); 879 Panel* panel = windowShim_->panel();
880 panel->OnTitlebarClicked((modifierFlags & NSShiftKeyMask) ? 880 panel->OnTitlebarClicked((modifierFlags & NSShiftKeyMask) ?
881 panel::APPLY_TO_ALL : panel::NO_MODIFIER); 881 panel::APPLY_TO_ALL : panel::NO_MODIFIER);
882 } 882 }
883 883
884 - (int)titlebarHeightInScreenCoordinates { 884 - (int)titlebarHeightInScreenCoordinates {
885 NSView* titlebar = [self titlebarView]; 885 NSView* titlebar = [self titlebarView];
886 return NSHeight([titlebar convertRect:[titlebar bounds] toView:nil]); 886 return NSHeight([titlebar convertRect:[titlebar bounds] toView:nil]);
887 } 887 }
888 888
889 - (int)titlebarIconOnlyWidthInScreenCoordinates {
890 return [[self titlebarView] iconOnlyWidthInScreenCoordinates];
891 }
892
893 - (void)ensureFullyVisible { 889 - (void)ensureFullyVisible {
894 // Shows the window without making it key, on top of its layer, even if 890 // Shows the window without making it key, on top of its layer, even if
895 // Chromium is not an active app. 891 // Chromium is not an active app.
896 [[self window] orderFrontRegardless]; 892 [[self window] orderFrontRegardless];
897 } 893 }
898 894
899 // TODO(dcheng): These two selectors are almost copy-and-paste from 895 // TODO(dcheng): These two selectors are almost copy-and-paste from
900 // BrowserWindowController. Figure out the appropriate way of code sharing, 896 // BrowserWindowController. Figure out the appropriate way of code sharing,
901 // whether it's refactoring more things into BrowserWindowUtils or making a 897 // whether it's refactoring more things into BrowserWindowUtils or making a
902 // common base controller for browser windows. 898 // common base controller for browser windows.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 [[self window] setLevel:NSDockWindowLevel]; 1007 [[self window] setLevel:NSDockWindowLevel];
1012 } 1008 }
1013 1009
1014 - (void)enableResizeByMouse:(BOOL)enable { 1010 - (void)enableResizeByMouse:(BOOL)enable {
1015 if (![self isWindowLoaded]) 1011 if (![self isWindowLoaded])
1016 return; 1012 return;
1017 [[self window] invalidateCursorRectsForView:overlayView_]; 1013 [[self window] invalidateCursorRectsForView:overlayView_];
1018 } 1014 }
1019 1015
1020 @end 1016 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_window_controller_cocoa.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698