| OLD | NEW |
| 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 "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.h" | 8 #include "chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.h" |
| 9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
| 10 #include "content/public/browser/web_ui.h" | 10 #include "content/public/browser/web_ui.h" |
| 11 | 11 |
| 12 #define ENABLE_VR_SHELL_UI_DEV |
| 13 |
| 12 #if !defined(ENABLE_VR_SHELL_UI_DEV) | 14 #if !defined(ENABLE_VR_SHELL_UI_DEV) |
| 13 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/grit/browser_resources.h" | 16 #include "chrome/grit/browser_resources.h" |
| 15 #include "chrome/grit/generated_resources.h" | 17 #include "chrome/grit/generated_resources.h" |
| 16 #include "content/public/browser/web_ui_data_source.h" | 18 #include "content/public/browser/web_ui_data_source.h" |
| 17 #else | 19 #else |
| 18 #include <map> | 20 #include <map> |
| 19 #include "base/macros.h" | 21 #include "base/macros.h" |
| 20 #include "base/memory/ref_counted_memory.h" | 22 #include "base/memory/ref_counted_memory.h" |
| 21 #include "base/strings/string_util.h" | 23 #include "base/strings/string_util.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 #if !defined(ENABLE_VR_SHELL_UI_DEV) | 205 #if !defined(ENABLE_VR_SHELL_UI_DEV) |
| 204 content::WebUIDataSource::Add(profile, CreateVrShellUIHTMLSource()); | 206 content::WebUIDataSource::Add(profile, CreateVrShellUIHTMLSource()); |
| 205 #else | 207 #else |
| 206 content::URLDataSource::Add( | 208 content::URLDataSource::Add( |
| 207 profile, new RemoteDataSource(profile->GetRequestContext())); | 209 profile, new RemoteDataSource(profile->GetRequestContext())); |
| 208 #endif | 210 #endif |
| 209 web_ui->AddMessageHandler(new VrShellUIMessageHandler); | 211 web_ui->AddMessageHandler(new VrShellUIMessageHandler); |
| 210 } | 212 } |
| 211 | 213 |
| 212 VrShellUIUI::~VrShellUIUI() {} | 214 VrShellUIUI::~VrShellUIUI() {} |
| OLD | NEW |