Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(971)

Side by Side Diff: ash/wm/immersive_fullscreen_controller.cc

Issue 902123002: Fix initial hiding and centering cursor on Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/wm/immersive_fullscreen_controller.h" 5 #include "ash/wm/immersive_fullscreen_controller.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 // top-of-window views revealed. 348 // top-of-window views revealed.
349 std::vector<gfx::Rect> bounds_in_screen( 349 std::vector<gfx::Rect> bounds_in_screen(
350 delegate_->GetVisibleBoundsInScreen()); 350 delegate_->GetVisibleBoundsInScreen());
351 DCHECK(!bounds_in_screen.empty()); 351 DCHECK(!bounds_in_screen.empty());
352 int bottommost_in_screen = bounds_in_screen[0].bottom(); 352 int bottommost_in_screen = bounds_in_screen[0].bottom();
353 for (size_t i = 1; i < bounds_in_screen.size(); ++i) { 353 for (size_t i = 1; i < bounds_in_screen.size(); ++i) {
354 if (bounds_in_screen[i].bottom() > bottommost_in_screen) 354 if (bounds_in_screen[i].bottom() > bottommost_in_screen)
355 bottommost_in_screen = bounds_in_screen[i].bottom(); 355 bottommost_in_screen = bounds_in_screen[i].bottom();
356 } 356 }
357 gfx::Point cursor_pos(0, bottommost_in_screen + 100); 357 gfx::Point cursor_pos(0, bottommost_in_screen + 100);
358 aura::Env::GetInstance()->set_last_mouse_location(cursor_pos); 358 aura::Env::GetInstance()->SetLastMouseLocation(cursor_pos);
359 UpdateLocatedEventRevealedLock(NULL); 359 UpdateLocatedEventRevealedLock(NULL);
360 } 360 }
361 361
362 //////////////////////////////////////////////////////////////////////////////// 362 ////////////////////////////////////////////////////////////////////////////////
363 // ui::EventHandler overrides: 363 // ui::EventHandler overrides:
364 364
365 void ImmersiveFullscreenController::OnMouseEvent(ui::MouseEvent* event) { 365 void ImmersiveFullscreenController::OnMouseEvent(ui::MouseEvent* event) {
366 if (!enabled_) 366 if (!enabled_)
367 return; 367 return;
368 368
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 AsBubbleDelegate(transient_child); 947 AsBubbleDelegate(transient_child);
948 if (bubble_delegate && 948 if (bubble_delegate &&
949 bubble_delegate->GetAnchorView() && 949 bubble_delegate->GetAnchorView() &&
950 top_container_->Contains(bubble_delegate->GetAnchorView())) { 950 top_container_->Contains(bubble_delegate->GetAnchorView())) {
951 bubble_manager_->StartObserving(transient_child); 951 bubble_manager_->StartObserving(transient_child);
952 } 952 }
953 } 953 }
954 } 954 }
955 955
956 } // namespace ash 956 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698