| OLD | NEW |
| 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 Loading... |
| 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 |
| 264 void PanelCocoa::UpdatePanelMinimizeRestoreButtonVisibility() { | 268 void PanelCocoa::UpdatePanelMinimizeRestoreButtonVisibility() { |
| 265 [controller_ updateTitleBarMinimizeRestoreButtonVisibility]; | 269 [controller_ updateTitleBarMinimizeRestoreButtonVisibility]; |
| 266 } | 270 } |
| 267 | 271 |
| 268 void PanelCocoa::SetWindowCornerStyle(panel::CornerStyle corner_style) { | 272 void PanelCocoa::SetWindowCornerStyle(panel::CornerStyle corner_style) { |
| 269 corner_style_ = corner_style; | 273 corner_style_ = corner_style; |
| 270 | 274 |
| 271 // TODO(dimich): investigate how to support it on Mac. | 275 // TODO(dimich): investigate how to support it on Mac. |
| 272 } | 276 } |
| 273 | 277 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 panel::CornerStyle CocoaNativePanelTesting::GetWindowCornerStyle() const { | 460 panel::CornerStyle CocoaNativePanelTesting::GetWindowCornerStyle() const { |
| 457 return native_panel_window_->corner_style_; | 461 return native_panel_window_->corner_style_; |
| 458 } | 462 } |
| 459 | 463 |
| 460 bool CocoaNativePanelTesting::EnsureApplicationRunOnForeground() { | 464 bool CocoaNativePanelTesting::EnsureApplicationRunOnForeground() { |
| 461 if ([NSApp isActive]) | 465 if ([NSApp isActive]) |
| 462 return true; | 466 return true; |
| 463 [NSApp activateIgnoringOtherApps:YES]; | 467 [NSApp activateIgnoringOtherApps:YES]; |
| 464 return [NSApp isActive]; | 468 return [NSApp isActive]; |
| 465 } | 469 } |
| OLD | NEW |