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

Side by Side Diff: chrome/browser/ui/exclusive_access/flash_fullscreen_interactive_browsertest.cc

Issue 2915613004: [PointerLock] Move "silent mouse lock" logic from renderer to RWHI (Closed)
Patch Set: jochen's comment: Remove 'const' before local bool Created 3 years, 6 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
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_guest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 content::WebContents* web_contents = GetActiveWebContents(); 420 content::WebContents* web_contents = GetActiveWebContents();
421 EXPECT_TRUE(ObserveFlashHasFocus(web_contents, true)); 421 EXPECT_TRUE(ObserveFlashHasFocus(web_contents, true));
422 422
423 // Try to lock the mouse. 423 // Try to lock the mouse.
424 content::RenderWidgetHostView* fullscreen_view = 424 content::RenderWidgetHostView* fullscreen_view =
425 web_contents->GetFullscreenRenderWidgetHostView(); 425 web_contents->GetFullscreenRenderWidgetHostView();
426 content::RenderWidgetHost* fullscreen_widget = 426 content::RenderWidgetHost* fullscreen_widget =
427 fullscreen_view->GetRenderWidgetHost(); 427 fullscreen_view->GetRenderWidgetHost();
428 content::RenderProcessHost* process = fullscreen_widget->GetProcess(); 428 content::RenderProcessHost* process = fullscreen_widget->GetProcess();
429 content::PwnMessageHelper::LockMouse( 429 content::PwnMessageHelper::LockMouse(
430 process, fullscreen_widget->GetRoutingID(), true, false, true); 430 process, fullscreen_widget->GetRoutingID(), true, true);
431 431
432 // Make sure that the fullscreen widget got the mouse lock. 432 // Make sure that the fullscreen widget got the mouse lock.
433 EXPECT_TRUE(fullscreen_view->IsMouseLocked()); 433 EXPECT_TRUE(fullscreen_view->IsMouseLocked());
434 EXPECT_EQ(fullscreen_widget, content::GetMouseLockWidget(web_contents)); 434 EXPECT_EQ(fullscreen_widget, content::GetMouseLockWidget(web_contents));
435 435
436 PressEscape(); 436 PressEscape();
437 EXPECT_TRUE(ObserveTabIsInFullscreen(false)); 437 EXPECT_TRUE(ObserveTabIsInFullscreen(false));
438 438
439 // Mouse should be unlocked. 439 // Mouse should be unlocked.
440 EXPECT_EQ(nullptr, content::GetMouseLockWidget(web_contents)); 440 EXPECT_EQ(nullptr, content::GetMouseLockWidget(web_contents));
441 } 441 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698