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/multi_window_resize_controller.h" | 5 #include "ash/wm/workspace/multi_window_resize_controller.h" |
6 | 6 |
7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/wm/coordinate_conversion.h" | 10 #include "ash/wm/coordinate_conversion.h" |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 void MultiWindowResizeController::ShowNow() { | 379 void MultiWindowResizeController::ShowNow() { |
380 DCHECK(!resize_widget_.get()); | 380 DCHECK(!resize_widget_.get()); |
381 DCHECK(windows_.is_valid()); | 381 DCHECK(windows_.is_valid()); |
382 show_timer_.Stop(); | 382 show_timer_.Stop(); |
383 resize_widget_.reset(new views::Widget); | 383 resize_widget_.reset(new views::Widget); |
384 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); | 384 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); |
385 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 385 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
386 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 386 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
387 params.parent = Shell::GetContainer(Shell::GetTargetRootWindow(), | 387 params.parent = Shell::GetContainer(Shell::GetTargetRootWindow(), |
388 kShellWindowId_AlwaysOnTopContainer); | 388 kShellWindowId_AlwaysOnTopContainer); |
| 389 params.can_activate = false; |
389 ResizeView* view = new ResizeView(this, windows_.direction); | 390 ResizeView* view = new ResizeView(this, windows_.direction); |
390 resize_widget_->set_focus_on_creation(false); | 391 resize_widget_->set_focus_on_creation(false); |
391 resize_widget_->Init(params); | 392 resize_widget_->Init(params); |
392 ::wm::SetWindowVisibilityAnimationType( | 393 ::wm::SetWindowVisibilityAnimationType( |
393 resize_widget_->GetNativeWindow(), | 394 resize_widget_->GetNativeWindow(), |
394 ::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); | 395 ::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); |
395 resize_widget_->GetNativeWindow()->SetName("MultiWindowResizeController"); | 396 resize_widget_->GetNativeWindow()->SetName("MultiWindowResizeController"); |
396 resize_widget_->SetContentsView(view); | 397 resize_widget_->SetContentsView(view); |
397 show_bounds_in_screen_ = ScreenUtil::ConvertRectToScreen( | 398 show_bounds_in_screen_ = ScreenUtil::ConvertRectToScreen( |
398 windows_.window1->parent(), | 399 windows_.window1->parent(), |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 return false; | 534 return false; |
534 | 535 |
535 gfx::Point window_loc(location_in_screen); | 536 gfx::Point window_loc(location_in_screen); |
536 aura::Window::ConvertPointToTarget( | 537 aura::Window::ConvertPointToTarget( |
537 window->GetRootWindow(), window, &window_loc); | 538 window->GetRootWindow(), window, &window_loc); |
538 return window->ContainsPoint(window_loc) && | 539 return window->ContainsPoint(window_loc) && |
539 window->delegate()->GetNonClientComponent(window_loc) == component; | 540 window->delegate()->GetNonClientComponent(window_loc) == component; |
540 } | 541 } |
541 | 542 |
542 } // namespace ash | 543 } // namespace ash |
OLD | NEW |