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

Side by Side Diff: chrome/browser/ui/cocoa/panels/panel_cocoa.mm

Issue 23918002: Switch to doing user-resizing via system for panels on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to reland Created 7 years, 3 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/cocoa/panels/panel_cocoa.h" 5 #include "chrome/browser/ui/cocoa/panels/panel_cocoa.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h" 8 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h"
9 #import "chrome/browser/ui/cocoa/panels/panel_titlebar_view_cocoa.h" 9 #import "chrome/browser/ui/cocoa/panels/panel_titlebar_view_cocoa.h"
10 #import "chrome/browser/ui/cocoa/panels/panel_utils_cocoa.h" 10 #import "chrome/browser/ui/cocoa/panels/panel_utils_cocoa.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 254 }
255 255
256 void PanelCocoa::SetPanelAlwaysOnTop(bool on_top) { 256 void PanelCocoa::SetPanelAlwaysOnTop(bool on_top) {
257 if (always_on_top_ == on_top) 257 if (always_on_top_ == on_top)
258 return; 258 return;
259 always_on_top_ = on_top; 259 always_on_top_ = on_top;
260 [controller_ updateWindowLevel]; 260 [controller_ updateWindowLevel];
261 [controller_ updateWindowCollectionBehavior]; 261 [controller_ updateWindowCollectionBehavior];
262 } 262 }
263 263
264 void PanelCocoa::EnableResizeByMouse(bool enable) {
265 [controller_ enableResizeByMouse:enable];
266 }
267
268 void PanelCocoa::UpdatePanelMinimizeRestoreButtonVisibility() { 264 void PanelCocoa::UpdatePanelMinimizeRestoreButtonVisibility() {
269 [controller_ updateTitleBarMinimizeRestoreButtonVisibility]; 265 [controller_ updateTitleBarMinimizeRestoreButtonVisibility];
270 } 266 }
271 267
272 void PanelCocoa::SetWindowCornerStyle(panel::CornerStyle corner_style) { 268 void PanelCocoa::SetWindowCornerStyle(panel::CornerStyle corner_style) {
273 corner_style_ = corner_style; 269 corner_style_ = corner_style;
274 270
275 // TODO(dimich): investigate how to support it on Mac. 271 // TODO(dimich): investigate how to support it on Mac.
276 } 272 }
277 273
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 panel::CornerStyle CocoaNativePanelTesting::GetWindowCornerStyle() const { 456 panel::CornerStyle CocoaNativePanelTesting::GetWindowCornerStyle() const {
461 return native_panel_window_->corner_style_; 457 return native_panel_window_->corner_style_;
462 } 458 }
463 459
464 bool CocoaNativePanelTesting::EnsureApplicationRunOnForeground() { 460 bool CocoaNativePanelTesting::EnsureApplicationRunOnForeground() {
465 if ([NSApp isActive]) 461 if ([NSApp isActive])
466 return true; 462 return true;
467 [NSApp activateIgnoringOtherApps:YES]; 463 [NSApp activateIgnoringOtherApps:YES];
468 return [NSApp isActive]; 464 return [NSApp isActive];
469 } 465 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/panels/panel_cocoa.h ('k') | chrome/browser/ui/cocoa/panels/panel_utils_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698