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

Unified Diff: components/test_runner/mock_color_chooser.h

Issue 1852603002: Replacing most of web_task.h with base::Closure + base::WeakPtrFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-mocks-to-test-runner
Patch Set: Rebasing... Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/test_runner/event_sender.cc ('k') | components/test_runner/mock_color_chooser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/mock_color_chooser.h
diff --git a/components/test_runner/mock_color_chooser.h b/components/test_runner/mock_color_chooser.h
index 7ff492017bf94b09840b840fe9c72a8603c44bad..8e6d87ae817bf10fe25f07262e47cd4e3fb65105 100644
--- a/components/test_runner/mock_color_chooser.h
+++ b/components/test_runner/mock_color_chooser.h
@@ -6,7 +6,7 @@
#define COMPONENTS_TEST_RUNNER_MOCK_COLOR_CHOOSER_H_
#include "base/macros.h"
-#include "components/test_runner/web_task.h"
+#include "base/memory/weak_ptr.h"
#include "third_party/WebKit/public/web/WebColorChooser.h"
#include "third_party/WebKit/public/web/WebColorChooserClient.h"
@@ -31,13 +31,13 @@ class MockColorChooser : public blink::WebColorChooser {
void endChooser() override;
void InvokeDidEndChooser();
- WebTaskList* mutable_task_list() { return &task_list_; }
private:
blink::WebColorChooserClient* client_;
WebTestDelegate* delegate_;
TestRunner* test_runner_;
- WebTaskList task_list_;
+
+ base::WeakPtrFactory<MockColorChooser> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MockColorChooser);
};
« no previous file with comments | « components/test_runner/event_sender.cc ('k') | components/test_runner/mock_color_chooser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698