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/workspace/frame_maximize_button.h" | 5 #include "ash/wm/workspace/frame_maximize_button.h" |
6 | 6 |
7 #include "ash/launcher/launcher.h" | 7 #include "ash/launcher/launcher.h" |
8 #include "ash/screen_ash.h" | 8 #include "ash/screen_ash.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/wm/property_util.h" | 10 #include "ash/wm/property_util.h" |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 if (snap_type_ == SNAP_LEFT || snap_type_ == SNAP_RIGHT) { | 381 if (snap_type_ == SNAP_LEFT || snap_type_ == SNAP_RIGHT) { |
382 SnapSizer::Edge snap_edge = snap_type_ == SNAP_LEFT ? | 382 SnapSizer::Edge snap_edge = snap_type_ == SNAP_LEFT ? |
383 SnapSizer::LEFT_EDGE : SnapSizer::RIGHT_EDGE; | 383 SnapSizer::LEFT_EDGE : SnapSizer::RIGHT_EDGE; |
384 int grid_size = Shell::GetInstance()->GetGridSize(); | 384 int grid_size = Shell::GetInstance()->GetGridSize(); |
385 snap_sizer_.reset(new SnapSizer(frame_->GetWidget()->GetNativeWindow(), | 385 snap_sizer_.reset(new SnapSizer(frame_->GetWidget()->GetNativeWindow(), |
386 LocationForSnapSizer(location), | 386 LocationForSnapSizer(location), |
387 snap_edge, grid_size)); | 387 snap_edge, grid_size)); |
388 } | 388 } |
389 if (!phantom_window_.get()) { | 389 if (!phantom_window_.get()) { |
390 phantom_window_.reset(new internal::PhantomWindowController( | 390 phantom_window_.reset(new internal::PhantomWindowController( |
391 frame_->GetWidget()->GetNativeWindow())); | 391 frame_->GetWidget()->GetNativeWindow(), |
| 392 NULL, |
| 393 internal::PhantomWindowController::STYLE_SHADOW)); |
392 } | 394 } |
393 if (maximizer_.get()) { | 395 if (maximizer_.get()) { |
394 phantom_window_->set_phantom_below_window(maximizer_->GetBubbleWindow()); | 396 phantom_window_->set_phantom_below_window(maximizer_->GetBubbleWindow()); |
395 maximizer_->SetSnapType(snap_type_); | 397 maximizer_->SetSnapType(snap_type_); |
396 } | 398 } |
397 phantom_window_->Show(ScreenBoundsForType(snap_type_)); | 399 phantom_window_->Show(ScreenBoundsForType(snap_type_)); |
398 } | 400 } |
399 | 401 |
400 SnapType FrameMaximizeButton::SnapTypeForLocation( | 402 SnapType FrameMaximizeButton::SnapTypeForLocation( |
401 const gfx::Point& location) const { | 403 const gfx::Point& location) const { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 break; | 475 break; |
474 case SNAP_RESTORE: | 476 case SNAP_RESTORE: |
475 frame_->GetWidget()->Restore(); | 477 frame_->GetWidget()->Restore(); |
476 break; | 478 break; |
477 case SNAP_NONE: | 479 case SNAP_NONE: |
478 NOTREACHED(); | 480 NOTREACHED(); |
479 } | 481 } |
480 } | 482 } |
481 | 483 |
482 } // namespace ash | 484 } // namespace ash |
OLD | NEW |