OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 } | 401 } |
402 | 402 |
403 - (void)flipExpansionState { | 403 - (void)flipExpansionState { |
404 Panel* panel = windowShim_->panel(); | 404 Panel* panel = windowShim_->panel(); |
405 Panel::ExpansionState newExpansionState = | 405 Panel::ExpansionState newExpansionState = |
406 (panel->expansion_state() != Panel::EXPANDED) ? Panel::EXPANDED | 406 (panel->expansion_state() != Panel::EXPANDED) ? Panel::EXPANDED |
407 : Panel::MINIMIZED; | 407 : Panel::MINIMIZED; |
408 panel->SetExpansionState(newExpansionState); | 408 panel->SetExpansionState(newExpansionState); |
409 } | 409 } |
410 | 410 |
411 - (int)titlebarHeightInScreeenCoordinates { | 411 - (int)titlebarHeightInScreenCoordinates { |
412 NSView* titlebar = [self titlebarView]; | 412 NSView* titlebar = [self titlebarView]; |
413 return NSHeight([titlebar convertRect:[titlebar bounds] toView:nil]); | 413 return NSHeight([titlebar convertRect:[titlebar bounds] toView:nil]); |
414 } | 414 } |
415 // TestingAPI interface implementation | 415 // TestingAPI interface implementation |
416 | 416 |
417 + (void)enableBoundsAnimationNotifications { | 417 + (void)enableBoundsAnimationNotifications { |
418 g_reportAnimationStatus = YES; | 418 g_reportAnimationStatus = YES; |
419 } | 419 } |
420 | 420 |
421 @end | 421 @end |
OLD | NEW |