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

Side by Side Diff: chrome/browser/devtools/devtools_targets_ui.h

Issue 2825533002: Introduce SerializeDictionaryForest for devtools_target_ui (Closed)
Patch Set: non-pre-ordered test and out params 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/devtools/BUILD.gn ('k') | chrome/browser/devtools/devtools_targets_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGETS_UI_H_ 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGETS_UI_H_
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGETS_UI_H_ 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGETS_UI_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 virtual void Open(const std::string& browser_id, const std::string& url); 44 virtual void Open(const std::string& browser_id, const std::string& url);
45 45
46 virtual scoped_refptr<content::DevToolsAgentHost> GetBrowserAgentHost( 46 virtual scoped_refptr<content::DevToolsAgentHost> GetBrowserAgentHost(
47 const std::string& browser_id); 47 const std::string& browser_id);
48 48
49 virtual void ForceUpdate(); 49 virtual void ForceUpdate();
50 50
51 protected: 51 protected:
52 std::unique_ptr<base::DictionaryValue> Serialize( 52 std::unique_ptr<base::DictionaryValue> Serialize(
53 scoped_refptr<content::DevToolsAgentHost> host); 53 content::DevToolsAgentHost* host);
54 void SendSerializedTargets(const base::ListValue& list); 54 void SendSerializedTargets(const base::ListValue& list);
55 55
56 using TargetMap = 56 using TargetMap =
57 std::map<std::string, scoped_refptr<content::DevToolsAgentHost>>; 57 std::map<std::string, scoped_refptr<content::DevToolsAgentHost>>;
58 TargetMap targets_; 58 TargetMap targets_;
59 59
60 private: 60 private:
61 const std::string source_id_; 61 const std::string source_id_;
62 Callback callback_; 62 Callback callback_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(DevToolsTargetsUIHandler); 64 DISALLOW_COPY_AND_ASSIGN(DevToolsTargetsUIHandler);
65 }; 65 };
66 66
67 class PortForwardingStatusSerializer 67 class PortForwardingStatusSerializer
68 : private DevToolsAndroidBridge::PortForwardingListener { 68 : private DevToolsAndroidBridge::PortForwardingListener {
69 public: 69 public:
70 typedef base::Callback<void(const base::Value&)> Callback; 70 typedef base::Callback<void(const base::Value&)> Callback;
71 71
72 PortForwardingStatusSerializer(const Callback& callback, Profile* profile); 72 PortForwardingStatusSerializer(const Callback& callback, Profile* profile);
73 ~PortForwardingStatusSerializer() override; 73 ~PortForwardingStatusSerializer() override;
74 74
75 void PortStatusChanged(const ForwardingStatus& status) override; 75 void PortStatusChanged(const ForwardingStatus& status) override;
76 76
77 private: 77 private:
78 Callback callback_; 78 Callback callback_;
79 Profile* profile_; 79 Profile* profile_;
80 }; 80 };
81 81
82 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGETS_UI_H_ 82 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_TARGETS_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/devtools/BUILD.gn ('k') | chrome/browser/devtools/devtools_targets_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698