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

Side by Side Diff: chromecast/browser/devtools/cast_dev_tools_delegate.cc

Issue 1114503002: [DevTools] Cleanup DevToolsTarget and DevToolsManagerDelegate after moving to devtools_discovery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@devtools-discovery-chrome
Patch Set: Created 5 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/browser/devtools/cast_dev_tools_delegate.h" 5 #include "chromecast/browser/devtools/cast_dev_tools_delegate.h"
6 6
7 #include "base/files/file_path.h"
8 #include "base/macros.h" 7 #include "base/macros.h"
9 #include "base/strings/utf_string_conversions.h"
10 #include "components/devtools_discovery/devtools_discovery_manager.h"
11 #include "content/public/browser/devtools_agent_host.h"
12 #include "content/public/browser/devtools_target.h"
13 #include "content/public/browser/favicon_status.h"
14 #include "content/public/browser/navigation_entry.h"
15 #include "content/public/browser/render_view_host.h"
16 #include "content/public/browser/web_contents.h"
17 #include "content/public/browser/web_contents_delegate.h"
18 #include "grit/shell_resources.h" 8 #include "grit/shell_resources.h"
19 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
20 10
21 namespace chromecast { 11 namespace chromecast {
22 namespace shell { 12 namespace shell {
23 13
24 // CastDevToolsDelegate ----------------------------------------------------- 14 // CastDevToolsDelegate -----------------------------------------------------
25 15
26 CastDevToolsDelegate::CastDevToolsDelegate() { 16 CastDevToolsDelegate::CastDevToolsDelegate() {
27 } 17 }
28 18
29 CastDevToolsDelegate::~CastDevToolsDelegate() { 19 CastDevToolsDelegate::~CastDevToolsDelegate() {
30 } 20 }
31 21
32 std::string CastDevToolsDelegate::GetDiscoveryPageHTML() { 22 std::string CastDevToolsDelegate::GetDiscoveryPageHTML() {
33 #if defined(OS_ANDROID) 23 #if defined(OS_ANDROID)
34 return std::string(); 24 return std::string();
35 #else 25 #else
36 return ResourceBundle::GetSharedInstance().GetRawDataResource( 26 return ResourceBundle::GetSharedInstance().GetRawDataResource(
37 IDR_CAST_SHELL_DEVTOOLS_DISCOVERY_PAGE).as_string(); 27 IDR_CAST_SHELL_DEVTOOLS_DISCOVERY_PAGE).as_string();
38 #endif // defined(OS_ANDROID) 28 #endif // defined(OS_ANDROID)
39 } 29 }
40 30
41 std::string CastDevToolsDelegate::GetFrontendResource( 31 std::string CastDevToolsDelegate::GetFrontendResource(
42 const std::string& path) { 32 const std::string& path) {
43 return std::string(); 33 return std::string();
44 } 34 }
45 35
46 // CastDevToolsManagerDelegate ----------------------------------------------- 36 std::string CastDevToolsDelegate::GetPageThumbnailData(const GURL& url) {
47 37 return std::string();
48 CastDevToolsManagerDelegate::CastDevToolsManagerDelegate() {
49 }
50
51 CastDevToolsManagerDelegate::~CastDevToolsManagerDelegate() {
52 }
53
54 base::DictionaryValue* CastDevToolsManagerDelegate::HandleCommand(
55 content::DevToolsAgentHost* agent_host,
56 base::DictionaryValue* command) {
57 return NULL;
58 }
59
60 std::string CastDevToolsManagerDelegate::GetPageThumbnailData(
61 const GURL& url) {
62 return "";
63 }
64
65 scoped_ptr<content::DevToolsTarget>
66 CastDevToolsManagerDelegate::CreateNewTarget(const GURL& url) {
67 return scoped_ptr<content::DevToolsTarget>();
68 }
69
70 void CastDevToolsManagerDelegate::EnumerateTargets(TargetCallback callback) {
71 TargetList targets;
72 devtools_discovery::DevToolsDiscoveryManager* discovery_manager =
73 devtools_discovery::DevToolsDiscoveryManager::GetInstance();
74 for (const auto& descriptor : discovery_manager->GetDescriptors())
75 targets.push_back(descriptor);
76 callback.Run(targets);
77 } 38 }
78 39
79 } // namespace shell 40 } // namespace shell
80 } // namespace chromecast 41 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/devtools/cast_dev_tools_delegate.h ('k') | chromecast/browser/devtools/remote_debugging_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698