| 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 bubble_widget_(NULL), | 384 bubble_widget_(NULL), |
| 385 contents_view_(NULL), | 385 contents_view_(NULL), |
| 386 bubble_border_(NULL), | 386 bubble_border_(NULL), |
| 387 appearance_delay_ms_(appearance_delay_ms) { | 387 appearance_delay_ms_(appearance_delay_ms) { |
| 388 set_margins(gfx::Insets()); | 388 set_margins(gfx::Insets()); |
| 389 | 389 |
| 390 // The window needs to be owned by the root so that the SnapSizer does not | 390 // The window needs to be owned by the root so that the SnapSizer does not |
| 391 // cover it upon animation. | 391 // cover it upon animation. |
| 392 aura::Window* parent = Shell::GetContainer( | 392 aura::Window* parent = Shell::GetContainer( |
| 393 Shell::GetActiveRootWindow(), | 393 Shell::GetActiveRootWindow(), |
| 394 internal::kShellWindowId_LauncherContainer); | 394 internal::kShellWindowId_ShelfContainer); |
| 395 set_parent_window(parent); | 395 set_parent_window(parent); |
| 396 | 396 |
| 397 set_notify_enter_exit_on_child(true); | 397 set_notify_enter_exit_on_child(true); |
| 398 set_adjust_if_offscreen(false); | 398 set_adjust_if_offscreen(false); |
| 399 SetPaintToLayer(true); | 399 SetPaintToLayer(true); |
| 400 SetFillsBoundsOpaquely(false); | 400 SetFillsBoundsOpaquely(false); |
| 401 set_color(kBubbleBackgroundColor); | 401 set_color(kBubbleBackgroundColor); |
| 402 set_close_on_deactivate(false); | 402 set_close_on_deactivate(false); |
| 403 set_background( | 403 set_background( |
| 404 views::Background::CreateSolidBackground(kBubbleBackgroundColor)); | 404 views::Background::CreateSolidBackground(kBubbleBackgroundColor)); |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 if (!GetBoundsInScreen().Contains(screen_location)) | 856 if (!GetBoundsInScreen().Contains(screen_location)) |
| 857 button_row_->ButtonHovered(NULL); | 857 button_row_->ButtonHovered(NULL); |
| 858 else | 858 else |
| 859 button_row_->ButtonHovered(this); | 859 button_row_->ButtonHovered(this); |
| 860 | 860 |
| 861 // Pass the event on to the normal handler. | 861 // Pass the event on to the normal handler. |
| 862 return views::ImageButton::OnMouseDragged(event); | 862 return views::ImageButton::OnMouseDragged(event); |
| 863 } | 863 } |
| 864 | 864 |
| 865 } // namespace ash | 865 } // namespace ash |
| OLD | NEW |