| 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/frame/caption_buttons/maximize_bubble_controller_bubble.h" | 5 #include "ash/frame/caption_buttons/maximize_bubble_controller_bubble.h" |
| 6 | 6 |
| 7 #include "ash/frame/caption_buttons/bubble_contents_button_row.h" | 7 #include "ash/frame/caption_buttons/bubble_contents_button_row.h" |
| 8 #include "ash/frame/caption_buttons/frame_maximize_button.h" | 8 #include "ash/frame/caption_buttons/frame_maximize_button.h" |
| 9 #include "ash/frame/caption_buttons/maximize_bubble_controller.h" | 9 #include "ash/frame/caption_buttons/maximize_bubble_controller.h" |
| 10 #include "ash/metrics/user_metrics_recorder.h" | 10 #include "ash/metrics/user_metrics_recorder.h" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 views::BubbleBorder::TOP_RIGHT), | 341 views::BubbleBorder::TOP_RIGHT), |
| 342 shutting_down_(false), | 342 shutting_down_(false), |
| 343 owner_(owner), | 343 owner_(owner), |
| 344 contents_view_(NULL), | 344 contents_view_(NULL), |
| 345 bubble_border_(NULL), | 345 bubble_border_(NULL), |
| 346 appearance_delay_ms_(appearance_delay_ms) { | 346 appearance_delay_ms_(appearance_delay_ms) { |
| 347 set_margins(gfx::Insets()); | 347 set_margins(gfx::Insets()); |
| 348 | 348 |
| 349 // The window needs to be owned by the root so that the phantom window does | 349 // The window needs to be owned by the root so that the phantom window does |
| 350 // not cover it upon animation. | 350 // not cover it upon animation. |
| 351 aura::Window* parent = Shell::GetContainer( | 351 aura::Window* parent = Shell::GetContainer(Shell::GetTargetRootWindow(), |
| 352 Shell::GetTargetRootWindow(), | 352 kShellWindowId_ShelfContainer); |
| 353 internal::kShellWindowId_ShelfContainer); | |
| 354 set_parent_window(parent); | 353 set_parent_window(parent); |
| 355 | 354 |
| 356 set_notify_enter_exit_on_child(true); | 355 set_notify_enter_exit_on_child(true); |
| 357 set_adjust_if_offscreen(false); | 356 set_adjust_if_offscreen(false); |
| 358 SetPaintToLayer(true); | 357 SetPaintToLayer(true); |
| 359 set_color(kBubbleBackgroundColor); | 358 set_color(kBubbleBackgroundColor); |
| 360 set_close_on_deactivate(false); | 359 set_close_on_deactivate(false); |
| 361 set_background( | 360 set_background( |
| 362 views::Background::CreateSolidBackground(kBubbleBackgroundColor)); | 361 views::Background::CreateSolidBackground(kBubbleBackgroundColor)); |
| 363 | 362 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 if (contents_view_) | 501 if (contents_view_) |
| 503 contents_view_->SetSnapType(snap_type); | 502 contents_view_->SetSnapType(snap_type); |
| 504 } | 503 } |
| 505 | 504 |
| 506 views::CustomButton* MaximizeBubbleControllerBubble::GetButtonForUnitTest( | 505 views::CustomButton* MaximizeBubbleControllerBubble::GetButtonForUnitTest( |
| 507 SnapType state) { | 506 SnapType state) { |
| 508 return contents_view_->GetButtonForUnitTest(state); | 507 return contents_view_->GetButtonForUnitTest(state); |
| 509 } | 508 } |
| 510 | 509 |
| 511 } // namespace ash | 510 } // namespace ash |
| OLD | NEW |