| 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 "ash/wm/maximize_bubble_controller.h" | 5 #include "ash/wm/maximize_bubble_controller.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
| 9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
| 10 #include "ash/wm/window_animations.h" | 10 #include "ash/wm/window_animations.h" |
| (...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 frame_maximize_button_->SnapButtonHovered(snap_type); | 791 frame_maximize_button_->SnapButtonHovered(snap_type); |
| 792 } | 792 } |
| 793 | 793 |
| 794 views::CustomButton* MaximizeBubbleController::GetButtonForUnitTest( | 794 views::CustomButton* MaximizeBubbleController::GetButtonForUnitTest( |
| 795 SnapType state) { | 795 SnapType state) { |
| 796 return bubble_ ? bubble_->GetButtonForUnitTest(state) : NULL; | 796 return bubble_ ? bubble_->GetButtonForUnitTest(state) : NULL; |
| 797 } | 797 } |
| 798 | 798 |
| 799 void MaximizeBubbleController::RequestDestructionThroughOwner() { | 799 void MaximizeBubbleController::RequestDestructionThroughOwner() { |
| 800 // Tell the parent to destroy us (if this didn't happen yet). | 800 // Tell the parent to destroy us (if this didn't happen yet). |
| 801 if (timer_.get()) { | 801 if (timer_) { |
| 802 timer_.reset(NULL); | 802 timer_.reset(NULL); |
| 803 // Informs the owner that the menu is gone and requests |this| destruction. | 803 // Informs the owner that the menu is gone and requests |this| destruction. |
| 804 frame_maximize_button_->DestroyMaximizeMenu(); | 804 frame_maximize_button_->DestroyMaximizeMenu(); |
| 805 // Note: After this call |this| is destroyed. | 805 // Note: After this call |this| is destroyed. |
| 806 } | 806 } |
| 807 } | 807 } |
| 808 | 808 |
| 809 void MaximizeBubbleController::CreateBubble() { | 809 void MaximizeBubbleController::CreateBubble() { |
| 810 if (!bubble_) | 810 if (!bubble_) |
| 811 bubble_ = new Bubble(this, appearance_delay_ms_); | 811 bubble_ = new Bubble(this, appearance_delay_ms_); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 if (!GetBoundsInScreen().Contains(screen_location)) | 855 if (!GetBoundsInScreen().Contains(screen_location)) |
| 856 button_row_->ButtonHovered(NULL); | 856 button_row_->ButtonHovered(NULL); |
| 857 else | 857 else |
| 858 button_row_->ButtonHovered(this); | 858 button_row_->ButtonHovered(this); |
| 859 | 859 |
| 860 // Pass the event on to the normal handler. | 860 // Pass the event on to the normal handler. |
| 861 return views::ImageButton::OnMouseDragged(event); | 861 return views::ImageButton::OnMouseDragged(event); |
| 862 } | 862 } |
| 863 | 863 |
| 864 } // namespace ash | 864 } // namespace ash |
| OLD | NEW |