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

Unified Diff: components/test_runner/mock_web_user_media_client.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
Index: components/test_runner/mock_web_user_media_client.h
diff --git a/components/test_runner/mock_web_user_media_client.h b/components/test_runner/mock_web_user_media_client.h
index dda0d4df31a92ae57a45abbba6f6e55b65801154..5649f796f1b0c5007be0eaf935327687c63cf0d1 100644
--- a/components/test_runner/mock_web_user_media_client.h
+++ b/components/test_runner/mock_web_user_media_client.h
@@ -6,7 +6,7 @@
#define COMPONENTS_TEST_RUNNER_MOCK_WEB_USER_MEDIA_CLIENT_H_
#include "base/macros.h"
-#include "components/test_runner/web_task.h"
+#include "base/memory/weak_ptr.h"
#include "third_party/WebKit/public/web/WebUserMediaClient.h"
namespace test_runner {
@@ -16,7 +16,7 @@ class WebTestDelegate;
class MockWebUserMediaClient : public blink::WebUserMediaClient {
public:
explicit MockWebUserMediaClient(WebTestDelegate* delegate);
- ~MockWebUserMediaClient() override {}
+ ~MockWebUserMediaClient() override;
void requestUserMedia(const blink::WebUserMediaRequest&) override;
void cancelUserMediaRequest(const blink::WebUserMediaRequest&) override;
@@ -24,13 +24,11 @@ class MockWebUserMediaClient : public blink::WebUserMediaClient {
void cancelMediaDevicesRequest(const blink::WebMediaDevicesRequest&) override;
void requestSources(const blink::WebMediaStreamTrackSourcesRequest&) override;
- // Task related methods
- WebTaskList* mutable_task_list() { return &task_list_; }
-
private:
- WebTaskList task_list_;
WebTestDelegate* delegate_;
+ base::WeakPtrFactory<MockWebUserMediaClient> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(MockWebUserMediaClient);
};
« no previous file with comments | « components/test_runner/mock_web_speech_recognizer.cc ('k') | components/test_runner/mock_web_user_media_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698