| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/caption_buttons/maximize_bubble_controller.h" | 5 #include "ash/wm/caption_buttons/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/caption_buttons/frame_maximize_button.h" | 10 #include "ash/wm/caption_buttons/frame_maximize_button.h" |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 AddChildView(contents_view_); | 409 AddChildView(contents_view_); |
| 410 | 410 |
| 411 // Note that the returned widget has an observer which points to our | 411 // Note that the returned widget has an observer which points to our |
| 412 // functions. | 412 // functions. |
| 413 bubble_widget_ = views::BubbleDelegateView::CreateBubble(this); | 413 bubble_widget_ = views::BubbleDelegateView::CreateBubble(this); |
| 414 bubble_widget_->set_focus_on_creation(false); | 414 bubble_widget_->set_focus_on_creation(false); |
| 415 | 415 |
| 416 SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | 416 SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); |
| 417 bubble_widget_->non_client_view()->frame_view()->set_background(NULL); | 417 bubble_widget_->non_client_view()->frame_view()->set_background(NULL); |
| 418 | 418 |
| 419 bubble_border_ = new MaximizeBubbleBorder(this, anchor_view()); | 419 bubble_border_ = new MaximizeBubbleBorder(this, AnchorView()); |
| 420 GetBubbleFrameView()->SetBubbleBorder(bubble_border_); | 420 GetBubbleFrameView()->SetBubbleBorder(bubble_border_); |
| 421 GetBubbleFrameView()->set_background(NULL); | 421 GetBubbleFrameView()->set_background(NULL); |
| 422 | 422 |
| 423 // Recalculate size with new border. | 423 // Recalculate size with new border. |
| 424 SizeToContents(); | 424 SizeToContents(); |
| 425 | 425 |
| 426 if (!appearance_delay_ms_) | 426 if (!appearance_delay_ms_) |
| 427 GetWidget()->Show(); | 427 GetWidget()->Show(); |
| 428 else | 428 else |
| 429 StartFade(true); | 429 StartFade(true); |
| (...skipping 425 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 |