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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 275 |
276 void PanelCocoa::DidCloseNativeWindow() { | 276 void PanelCocoa::DidCloseNativeWindow() { |
277 DCHECK(!isClosed()); | 277 DCHECK(!isClosed()); |
278 panel_->OnNativePanelClosed(); | 278 panel_->OnNativePanelClosed(); |
279 controller_ = NULL; | 279 controller_ = NULL; |
280 } | 280 } |
281 | 281 |
282 // NativePanelTesting implementation. | 282 // NativePanelTesting implementation. |
283 class CocoaNativePanelTesting : public NativePanelTesting { | 283 class CocoaNativePanelTesting : public NativePanelTesting { |
284 public: | 284 public: |
285 CocoaNativePanelTesting(NativePanel* native_panel); | 285 explicit CocoaNativePanelTesting(NativePanel* native_panel); |
286 virtual ~CocoaNativePanelTesting() { } | 286 virtual ~CocoaNativePanelTesting() { } |
287 // Overridden from NativePanelTesting | 287 // Overridden from NativePanelTesting |
288 virtual void PressLeftMouseButtonTitlebar( | 288 virtual void PressLeftMouseButtonTitlebar( |
289 const gfx::Point& mouse_location, panel::ClickModifier modifier) OVERRIDE; | 289 const gfx::Point& mouse_location, panel::ClickModifier modifier) OVERRIDE; |
290 virtual void ReleaseMouseButtonTitlebar( | 290 virtual void ReleaseMouseButtonTitlebar( |
291 panel::ClickModifier modifier) OVERRIDE; | 291 panel::ClickModifier modifier) OVERRIDE; |
292 virtual void DragTitlebar(const gfx::Point& mouse_location) OVERRIDE; | 292 virtual void DragTitlebar(const gfx::Point& mouse_location) OVERRIDE; |
293 virtual void CancelDragTitlebar() OVERRIDE; | 293 virtual void CancelDragTitlebar() OVERRIDE; |
294 virtual void FinishDragTitlebar() OVERRIDE; | 294 virtual void FinishDragTitlebar() OVERRIDE; |
295 virtual bool VerifyDrawingAttention() const OVERRIDE; | 295 virtual bool VerifyDrawingAttention() const OVERRIDE; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 return ![[titlebar() closeButton] isHidden]; | 382 return ![[titlebar() closeButton] isHidden]; |
383 case panel::MINIMIZE_BUTTON: | 383 case panel::MINIMIZE_BUTTON: |
384 return ![[titlebar() minimizeButton] isHidden]; | 384 return ![[titlebar() minimizeButton] isHidden]; |
385 case panel::RESTORE_BUTTON: | 385 case panel::RESTORE_BUTTON: |
386 return ![[titlebar() restoreButton] isHidden]; | 386 return ![[titlebar() restoreButton] isHidden]; |
387 default: | 387 default: |
388 NOTREACHED(); | 388 NOTREACHED(); |
389 } | 389 } |
390 return false; | 390 return false; |
391 } | 391 } |
OLD | NEW |