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

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

Issue 2960903002: VR: Use ToolbarModel to drive VR URL bar state. (Closed)
Patch Set: Update toolbar build file to include vector icons for Android. Created 3 years, 5 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 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_gl_thread.h" 5 #include "chrome/browser/android/vr_shell/vr_gl_thread.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "chrome/browser/android/vr_shell/toolbar_state.h"
9 #include "chrome/browser/android/vr_shell/ui_interface.h" 10 #include "chrome/browser/android/vr_shell/ui_interface.h"
10 #include "chrome/browser/android/vr_shell/ui_scene.h" 11 #include "chrome/browser/android/vr_shell/ui_scene.h"
11 #include "chrome/browser/android/vr_shell/ui_scene_manager.h" 12 #include "chrome/browser/android/vr_shell/ui_scene_manager.h"
12 #include "chrome/browser/android/vr_shell/vr_input_manager.h" 13 #include "chrome/browser/android/vr_shell/vr_input_manager.h"
13 #include "chrome/browser/android/vr_shell/vr_shell.h" 14 #include "chrome/browser/android/vr_shell/vr_shell.h"
14 #include "chrome/browser/android/vr_shell/vr_shell_gl.h" 15 #include "chrome/browser/android/vr_shell/vr_shell_gl.h"
15 #include "third_party/skia/include/core/SkBitmap.h" 16 #include "third_party/skia/include/core/SkBitmap.h"
16 17
17 namespace vr_shell { 18 namespace vr_shell {
18 19
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 base::Bind(&UiSceneManager::SetLoadProgress, 173 base::Bind(&UiSceneManager::SetLoadProgress,
173 weak_scene_manager_, progress)); 174 weak_scene_manager_, progress));
174 } 175 }
175 176
176 void VrGLThread::SetLoading(bool loading) { 177 void VrGLThread::SetLoading(bool loading) {
177 WaitUntilThreadStarted(); 178 WaitUntilThreadStarted();
178 task_runner()->PostTask(FROM_HERE, base::Bind(&UiSceneManager::SetLoading, 179 task_runner()->PostTask(FROM_HERE, base::Bind(&UiSceneManager::SetLoading,
179 weak_scene_manager_, loading)); 180 weak_scene_manager_, loading));
180 } 181 }
181 182
182 void VrGLThread::SetSecurityInfo(security_state::SecurityLevel level, 183 void VrGLThread::SetToolbarState(const ToolbarState& state) {
183 bool malware) {
184 WaitUntilThreadStarted(); 184 WaitUntilThreadStarted();
185 task_runner()->PostTask(FROM_HERE, 185 task_runner()->PostTask(
186 base::Bind(&UiSceneManager::SetSecurityInfo, 186 FROM_HERE,
187 weak_scene_manager_, level, malware)); 187 base::Bind(&UiSceneManager::SetToolbarState, weak_scene_manager_, state));
188 }
189
190 void VrGLThread::SetURL(const GURL& gurl) {
191 WaitUntilThreadStarted();
192 task_runner()->PostTask(FROM_HERE, base::Bind(&UiSceneManager::SetURL,
193 weak_scene_manager_, gurl));
194 } 188 }
195 189
196 void VrGLThread::SetWebVrMode(bool enabled, bool show_toast) { 190 void VrGLThread::SetWebVrMode(bool enabled, bool show_toast) {
197 WaitUntilThreadStarted(); 191 WaitUntilThreadStarted();
198 task_runner()->PostTask( 192 task_runner()->PostTask(
199 FROM_HERE, base::Bind(&UiSceneManager::SetWebVrMode, weak_scene_manager_, 193 FROM_HERE, base::Bind(&UiSceneManager::SetWebVrMode, weak_scene_manager_,
200 enabled, show_toast)); 194 enabled, show_toast));
201 } 195 }
202 196
203 void VrGLThread::SetWebVrSecureOrigin(bool secure) { 197 void VrGLThread::SetWebVrSecureOrigin(bool secure) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 weak_scene_manager_, bitmap)); 232 weak_scene_manager_, bitmap));
239 } 233 }
240 234
241 void VrGLThread::CleanUp() { 235 void VrGLThread::CleanUp() {
242 scene_manager_.reset(); 236 scene_manager_.reset();
243 vr_shell_gl_.reset(); 237 vr_shell_gl_.reset();
244 scene_.reset(); 238 scene_.reset();
245 } 239 }
246 240
247 } // namespace vr_shell 241 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_gl_thread.h ('k') | chrome/browser/android/vr_shell/vr_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698