OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/devtools_ui.h" | 5 #include "chrome/browser/ui/webui/devtools_ui.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 } | 40 } |
41 | 41 |
42 const char kRemoteFrontendDomain[] = "chrome-devtools-frontend.appspot.com"; | 42 const char kRemoteFrontendDomain[] = "chrome-devtools-frontend.appspot.com"; |
43 const char kRemoteFrontendBase[] = | 43 const char kRemoteFrontendBase[] = |
44 "https://chrome-devtools-frontend.appspot.com/"; | 44 "https://chrome-devtools-frontend.appspot.com/"; |
45 const char kHttpNotFound[] = "HTTP/1.1 404 Not Found\n\n"; | 45 const char kHttpNotFound[] = "HTTP/1.1 404 Not Found\n\n"; |
46 | 46 |
47 #if defined(DEBUG_DEVTOOLS) | 47 #if defined(DEBUG_DEVTOOLS) |
48 // Local frontend url provided by InspectUI. | 48 // Local frontend url provided by InspectUI. |
49 const char kFallbackFrontendURL[] = | 49 const char kFallbackFrontendURL[] = |
50 "chrome-devtools://devtools/bundled/devtools.html"; | 50 "chrome-devtools://devtools/bundled/inspector.html"; |
51 #else | 51 #else |
52 // URL causing the DevTools window to display a plain text warning. | 52 // URL causing the DevTools window to display a plain text warning. |
53 const char kFallbackFrontendURL[] = | 53 const char kFallbackFrontendURL[] = |
54 "data:text/plain,Cannot load DevTools frontend from an untrusted origin"; | 54 "data:text/plain,Cannot load DevTools frontend from an untrusted origin"; |
55 #endif // defined(DEBUG_DEVTOOLS) | 55 #endif // defined(DEBUG_DEVTOOLS) |
56 | 56 |
57 const char kRemoteOpenPrefix[] = "remote/open"; | 57 const char kRemoteOpenPrefix[] = "remote/open"; |
58 | 58 |
59 #if defined(DEBUG_DEVTOOLS) | 59 #if defined(DEBUG_DEVTOOLS) |
60 const char kLocalSerial[] = "local"; | 60 const char kLocalSerial[] = "local"; |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 params.should_replace_current_entry = true; | 419 params.should_replace_current_entry = true; |
420 remote_frontend_loading_url_ = virtual_url; | 420 remote_frontend_loading_url_ = virtual_url; |
421 navigation_controller.LoadURLWithParams(params); | 421 navigation_controller.LoadURLWithParams(params); |
422 navigation_controller.GetPendingEntry()->SetVirtualURL(virtual_url); | 422 navigation_controller.GetPendingEntry()->SetVirtualURL(virtual_url); |
423 | 423 |
424 DevToolsAndroidBridge* bridge = | 424 DevToolsAndroidBridge* bridge = |
425 DevToolsAndroidBridge::Factory::GetForProfile(profile); | 425 DevToolsAndroidBridge::Factory::GetForProfile(profile); |
426 scoped_ptr<DevToolsTargetImpl> target(bridge->CreatePageTarget(page)); | 426 scoped_ptr<DevToolsTargetImpl> target(bridge->CreatePageTarget(page)); |
427 bindings_.AttachTo(target->GetAgentHost()); | 427 bindings_.AttachTo(target->GetAgentHost()); |
428 } | 428 } |
OLD | NEW |