Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/wm/window_overview_mode.h" | 5 #include "athena/wm/window_overview_mode.h" |
| 6 | 6 |
| 7 #include <complex> | 7 #include <complex> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "athena/wm/overview_toolbar.h" | 10 #include "athena/wm/overview_toolbar.h" |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 423 while (!targeter && window->GetParentTarget()) { | 423 while (!targeter && window->GetParentTarget()) { |
| 424 window = window->GetParentTarget(); | 424 window = window->GetParentTarget(); |
| 425 targeter = window->GetEventTargeter(); | 425 targeter = window->GetEventTargeter(); |
| 426 } | 426 } |
| 427 if (!targeter) | 427 if (!targeter) |
| 428 return NULL; | 428 return NULL; |
| 429 aura::Window* target = static_cast<aura::Window*>( | 429 aura::Window* target = static_cast<aura::Window*>( |
| 430 targeter->FindTargetForLocatedEvent(container_, event)); | 430 targeter->FindTargetForLocatedEvent(container_, event)); |
| 431 while (target && target->parent() != container_) | 431 while (target && target->parent() != container_) |
| 432 target = target->parent(); | 432 target = target->parent(); |
| 433 aura::Window* transient_parent = wm::GetTransientParent(target); | 433 aura::Window* transient_parent = |
| 434 target ? wm::GetTransientParent(target) : NULL; | |
|
Jun Mukai
2014/10/13 18:20:24
Not sure how it's related to the lock screen. Cou
Dmitry Polukhin
2014/10/14 11:20:33
I see that first keyboard or mouse event after scr
Jun Mukai
2014/10/14 18:27:25
Still don't get it. Rather than handling here, sho
oshima
2014/10/14 19:05:15
I think this is a regression I introduced. I will
| |
| 434 return transient_parent ? transient_parent : target; | 435 return transient_parent ? transient_parent : target; |
| 435 } | 436 } |
| 436 | 437 |
| 437 // Scroll the window list by |delta_y| amount. |delta_y| is negative when | 438 // Scroll the window list by |delta_y| amount. |delta_y| is negative when |
| 438 // scrolling up; and positive when scrolling down. | 439 // scrolling up; and positive when scrolling down. |
| 439 void DoScroll(float delta_y) { | 440 void DoScroll(float delta_y) { |
| 440 const float kEpsilon = 1e-3f; | 441 const float kEpsilon = 1e-3f; |
| 441 float delta_y_p = std::abs(delta_y) / GetScrollableHeight(); | 442 float delta_y_p = std::abs(delta_y) / GetScrollableHeight(); |
| 442 const aura::Window::Windows& windows = | 443 const aura::Window::Windows& windows = |
| 443 window_list_provider_->GetWindowList(); | 444 window_list_provider_->GetWindowList(); |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 857 aura::Window* container, | 858 aura::Window* container, |
| 858 WindowListProvider* window_list_provider, | 859 WindowListProvider* window_list_provider, |
| 859 SplitViewController* split_view_controller, | 860 SplitViewController* split_view_controller, |
| 860 WindowOverviewModeDelegate* delegate) { | 861 WindowOverviewModeDelegate* delegate) { |
| 861 return scoped_ptr<WindowOverviewMode>( | 862 return scoped_ptr<WindowOverviewMode>( |
| 862 new WindowOverviewModeImpl(container, window_list_provider, | 863 new WindowOverviewModeImpl(container, window_list_provider, |
| 863 split_view_controller, delegate)); | 864 split_view_controller, delegate)); |
| 864 } | 865 } |
| 865 | 866 |
| 866 } // namespace athena | 867 } // namespace athena |
| OLD | NEW |