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

Side by Side Diff: components/devtools_discovery/devtools_discovery_manager.h

Issue 2234343002: Fixes naming issues in Browser protocol handler + adds tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_DEVTOOLS_DISCOVERY_DEVTOOLS_DISCOVERY_MANAGER_H_ 5 #ifndef COMPONENTS_DEVTOOLS_DISCOVERY_DEVTOOLS_DISCOVERY_MANAGER_H_
6 #define COMPONENTS_DEVTOOLS_DISCOVERY_DEVTOOLS_DISCOVERY_MANAGER_H_ 6 #define COMPONENTS_DEVTOOLS_DISCOVERY_DEVTOOLS_DISCOVERY_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 22 matching lines...) Expand all
33 // browser main loop exit so this method MUST NOT be called after that point. 33 // browser main loop exit so this method MUST NOT be called after that point.
34 static DevToolsDiscoveryManager* GetInstance(); 34 static DevToolsDiscoveryManager* GetInstance();
35 35
36 void AddProvider(std::unique_ptr<Provider> provider); 36 void AddProvider(std::unique_ptr<Provider> provider);
37 void SetCreateCallback(const CreateCallback& callback); 37 void SetCreateCallback(const CreateCallback& callback);
38 38
39 // Caller takes ownership of created descriptors. 39 // Caller takes ownership of created descriptors.
40 DevToolsTargetDescriptor::List GetDescriptors(); 40 DevToolsTargetDescriptor::List GetDescriptors();
41 std::unique_ptr<DevToolsTargetDescriptor> CreateNew(const GURL& url); 41 std::unique_ptr<DevToolsTargetDescriptor> CreateNew(const GURL& url);
42 42
43 // Handles Browser.newPage only. 43 // Handles Browser.createTarget only.
44 std::unique_ptr<base::DictionaryValue> HandleNewTargetCommand( 44 std::unique_ptr<base::DictionaryValue> HandleCreateTargetCommand(
45 base::DictionaryValue* command_dict); 45 base::DictionaryValue* command_dict);
46 46
47 private: 47 private:
48 friend struct base::DefaultSingletonTraits<DevToolsDiscoveryManager>; 48 friend struct base::DefaultSingletonTraits<DevToolsDiscoveryManager>;
49 49
50 DevToolsDiscoveryManager(); 50 DevToolsDiscoveryManager();
51 ~DevToolsDiscoveryManager(); 51 ~DevToolsDiscoveryManager();
52 DevToolsTargetDescriptor::List GetDescriptorsFromProviders(); 52 DevToolsTargetDescriptor::List GetDescriptorsFromProviders();
53 53
54 std::vector<Provider*> providers_; 54 std::vector<Provider*> providers_;
55 CreateCallback create_callback_; 55 CreateCallback create_callback_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(DevToolsDiscoveryManager); 57 DISALLOW_COPY_AND_ASSIGN(DevToolsDiscoveryManager);
58 }; 58 };
59 59
60 } // namespace devtools_discovery 60 } // namespace devtools_discovery
61 61
62 #endif // COMPONENTS_DEVTOOLS_DISCOVERY_DEVTOOLS_DISCOVERY_MANAGER_H_ 62 #endif // COMPONENTS_DEVTOOLS_DISCOVERY_DEVTOOLS_DISCOVERY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698