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

Unified Diff: headless/lib/browser/headless_devtools_manager_delegate.h

Issue 2784733003: Switch HeadlessDevToolsManagerDelegate to use base::Bind. (Closed)
Patch Set: lint Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | headless/lib/browser/headless_devtools_manager_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/lib/browser/headless_devtools_manager_delegate.h
diff --git a/headless/lib/browser/headless_devtools_manager_delegate.h b/headless/lib/browser/headless_devtools_manager_delegate.h
index 29c8c1d870d3b6235e64edac47a711f7dc0c7156..6c2a65912567525a7e4dd173b3fb09b16898dec0 100644
--- a/headless/lib/browser/headless_devtools_manager_delegate.h
+++ b/headless/lib/browser/headless_devtools_manager_delegate.h
@@ -5,14 +5,14 @@
#ifndef HEADLESS_LIB_BROWSER_HEADLESS_DEVTOOLS_MANAGER_DELEGATE_H_
#define HEADLESS_LIB_BROWSER_HEADLESS_DEVTOOLS_MANAGER_DELEGATE_H_
-#include "content/public/browser/devtools_manager_delegate.h"
-
#include <map>
#include <memory>
#include <string>
+#include "base/callback_forward.h"
#include "base/memory/weak_ptr.h"
#include "base/values.h"
+#include "content/public/browser/devtools_manager_delegate.h"
namespace headless {
class HeadlessBrowserImpl;
@@ -48,11 +48,11 @@ class HeadlessDevToolsManagerDelegate
base::WeakPtr<HeadlessBrowserImpl> browser_;
- using CommandMemberFnPtr = std::unique_ptr<base::DictionaryValue> (
- HeadlessDevToolsManagerDelegate::*)(int command_id,
- const base::DictionaryValue* params);
-
- std::map<std::string, CommandMemberFnPtr> command_map_;
+ using CommandMemberCallback =
+ base::Callback<std::unique_ptr<base::DictionaryValue>(
+ int command_id,
+ const base::DictionaryValue* params)>;
+ std::map<std::string, CommandMemberCallback> command_map_;
};
} // namespace headless
« no previous file with comments | « no previous file | headless/lib/browser/headless_devtools_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698