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

Side by Side Diff: chrome/browser/android/vr_shell/vr_shell.cc

Issue 2615113002: Send a resize message to renderer when exiting full screen in vr. (Closed)
Patch Set: Created 3 years, 11 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/android/vr_shell/vr_shell.h" 5 #include "chrome/browser/android/vr_shell/vr_shell.h"
6 6
7 #include <android/native_window_jni.h> 7 #include <android/native_window_jni.h>
8 8
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/threading/platform_thread.h" 10 #include "base/threading/platform_thread.h"
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 PostToGlThreadWhenReady(base::Bind(&VrShellGl::UpdateScene, 368 PostToGlThreadWhenReady(base::Bind(&VrShellGl::UpdateScene,
369 thread->GetVrShellGl(), 369 thread->GetVrShellGl(),
370 base::Passed(args->CreateDeepCopy()))); 370 base::Passed(args->CreateDeepCopy())));
371 } 371 }
372 372
373 void VrShell::DoUiAction(const UiAction action) { 373 void VrShell::DoUiAction(const UiAction action) {
374 content::NavigationController& controller = main_contents_->GetController(); 374 content::NavigationController& controller = main_contents_->GetController();
375 switch (action) { 375 switch (action) {
376 case HISTORY_BACK: 376 case HISTORY_BACK:
377 if (main_contents_->IsFullscreen()) { 377 if (main_contents_->IsFullscreen()) {
378 main_contents_->ExitFullscreen(true /* will_cause_resize */); 378 main_contents_->ExitFullscreen(false);
379 } else if (controller.CanGoBack()) { 379 } else if (controller.CanGoBack()) {
380 controller.GoBack(); 380 controller.GoBack();
381 } 381 }
382 break; 382 break;
383 case HISTORY_FORWARD: 383 case HISTORY_FORWARD:
384 if (controller.CanGoForward()) 384 if (controller.CanGoForward())
385 controller.GoForward(); 385 controller.GoForward();
386 break; 386 break;
387 case RELOAD: 387 case RELOAD:
388 controller.Reload(content::ReloadType::NORMAL, false); 388 controller.Reload(content::ReloadType::NORMAL, false);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 return reinterpret_cast<intptr_t>(new VrShell( 476 return reinterpret_cast<intptr_t>(new VrShell(
477 env, obj, content::WebContents::FromJavaWebContents(content_web_contents), 477 env, obj, content::WebContents::FromJavaWebContents(content_web_contents),
478 reinterpret_cast<ui::WindowAndroid*>(content_window_android), 478 reinterpret_cast<ui::WindowAndroid*>(content_window_android),
479 content::WebContents::FromJavaWebContents(ui_web_contents), 479 content::WebContents::FromJavaWebContents(ui_web_contents),
480 reinterpret_cast<ui::WindowAndroid*>(ui_window_android), 480 reinterpret_cast<ui::WindowAndroid*>(ui_window_android),
481 for_web_vr, VrShellDelegate::GetNativeDelegate(env, delegate), 481 for_web_vr, VrShellDelegate::GetNativeDelegate(env, delegate),
482 reinterpret_cast<gvr_context*>(gvr_api), reprojected_rendering)); 482 reinterpret_cast<gvr_context*>(gvr_api), reprojected_rendering));
483 } 483 }
484 484
485 } // namespace vr_shell 485 } // namespace vr_shell
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698