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

Side by Side Diff: chrome/browser/ui/webui/vr_shell/vr_shell_ui_ui.cc

Issue 2784303002: Adds button to VRShell menu mode, which lets the user manually exit WebVR presentation. (Closed)
Patch Set: Fixed closure compiler error Created 3 years, 8 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 | « chrome/browser/resources/vr_shell/vr_shell_ui_api.js ('k') | 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/ui/webui/vr_shell/vr_shell_ui_ui.h" 5 #include "chrome/browser/ui/webui/vr_shell/vr_shell_ui_ui.h"
6 6
7 #include <string> 7 #include <string>
8 #include <unordered_set> 8 #include <unordered_set>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 source->AddResourcePath("vk.css", IDR_VR_SHELL_UI_VK_CSS); 194 source->AddResourcePath("vk.css", IDR_VR_SHELL_UI_VK_CSS);
195 source->AddResourcePath("vk.js", IDR_VR_SHELL_UI_VK_JS); 195 source->AddResourcePath("vk.js", IDR_VR_SHELL_UI_VK_JS);
196 source->SetDefaultResource(IDR_VR_SHELL_UI_HTML); 196 source->SetDefaultResource(IDR_VR_SHELL_UI_HTML);
197 source->AddLocalizedString("insecureWebVrContentPermanent", 197 source->AddLocalizedString("insecureWebVrContentPermanent",
198 IDS_PAGE_INFO_INSECURE_WEBVR_CONTENT_PERMANENT); 198 IDS_PAGE_INFO_INSECURE_WEBVR_CONTENT_PERMANENT);
199 source->AddLocalizedString("insecureWebVrContentTransient", 199 source->AddLocalizedString("insecureWebVrContentTransient",
200 IDS_PAGE_INFO_INSECURE_WEBVR_CONTENT_TRANSIENT); 200 IDS_PAGE_INFO_INSECURE_WEBVR_CONTENT_TRANSIENT);
201 source->AddLocalizedString("back", IDS_VR_SHELL_UI_BACK_BUTTON); 201 source->AddLocalizedString("back", IDS_VR_SHELL_UI_BACK_BUTTON);
202 source->AddLocalizedString("forward", IDS_VR_SHELL_UI_FORWARD_BUTTON); 202 source->AddLocalizedString("forward", IDS_VR_SHELL_UI_FORWARD_BUTTON);
203 source->AddLocalizedString("reload", IDS_VR_SHELL_UI_RELOAD_BUTTON); 203 source->AddLocalizedString("reload", IDS_VR_SHELL_UI_RELOAD_BUTTON);
204 source->AddLocalizedString("exitPresent",
205 IDS_VR_SHELL_UI_EXIT_PRESENT_BUTTON);
204 source->AddLocalizedString("newTab", IDS_VR_SHELL_NEW_TAB_BUTTON); 206 source->AddLocalizedString("newTab", IDS_VR_SHELL_NEW_TAB_BUTTON);
205 source->AddLocalizedString("newIncognitoTab", 207 source->AddLocalizedString("newIncognitoTab",
206 IDS_VR_SHELL_NEW_INCOGNITO_TAB_BUTTON); 208 IDS_VR_SHELL_NEW_INCOGNITO_TAB_BUTTON);
207 209
208 return source; 210 return source;
209 } 211 }
210 #endif 212 #endif
211 213
212 } // namespace 214 } // namespace
213 215
214 VrShellUIUI::VrShellUIUI(content::WebUI* web_ui) : WebUIController(web_ui) { 216 VrShellUIUI::VrShellUIUI(content::WebUI* web_ui) : WebUIController(web_ui) {
215 Profile* profile = Profile::FromWebUI(web_ui); 217 Profile* profile = Profile::FromWebUI(web_ui);
216 #if !defined(ENABLE_VR_SHELL_UI_DEV) 218 #if !defined(ENABLE_VR_SHELL_UI_DEV)
217 content::WebUIDataSource::Add(profile, CreateVrShellUIHTMLSource()); 219 content::WebUIDataSource::Add(profile, CreateVrShellUIHTMLSource());
218 #else 220 #else
219 content::URLDataSource::Add( 221 content::URLDataSource::Add(
220 profile, new RemoteDataSource(profile->GetRequestContext())); 222 profile, new RemoteDataSource(profile->GetRequestContext()));
221 #endif 223 #endif
222 web_ui->AddMessageHandler(base::MakeUnique<VrShellUIMessageHandler>()); 224 web_ui->AddMessageHandler(base::MakeUnique<VrShellUIMessageHandler>());
223 } 225 }
224 226
225 VrShellUIUI::~VrShellUIUI() {} 227 VrShellUIUI::~VrShellUIUI() {}
OLDNEW
« no previous file with comments | « chrome/browser/resources/vr_shell/vr_shell_ui_api.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698