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

Unified Diff: components/test_runner/mock_color_chooser.h

Issue 2648123003: MockColorChooser
Patch Set: Created 3 years, 11 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 | 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 8e6d87ae817bf10fe25f07262e47cd4e3fb65105..6f5746ea559012bf10fff7d05bc3e06418ac319c 100644
--- a/components/test_runner/mock_color_chooser.h
+++ b/components/test_runner/mock_color_chooser.h
@@ -17,8 +17,8 @@ class WebTestDelegate;
class MockColorChooser : public blink::WebColorChooser {
public:
- // Caller has to guarantee that |client| and |delegate| are alive
- // until |WebColorChooserClient::didEndChooser| is called.
+ // Caller has to guarantee that |client| is alive until
+ // |WebColorChooserClient::didEndChooser| is called.
// Caller has to guarantee that |test_runner| lives longer
// than MockColorChooser.
MockColorChooser(blink::WebColorChooserClient* client,
@@ -31,6 +31,10 @@ class MockColorChooser : public blink::WebColorChooser {
void endChooser() override;
void InvokeDidEndChooser();
+ // MockColorChooser is owned by ColorChooserUIController which is garbage
+ // collected. That means this might be destroyed after WebTestDelegate is
+ // destryed, so we use this to clear |delegate_|.
+ void SetDelegate(WebTestDelegate*);
private:
blink::WebColorChooserClient* client_;
« no previous file with comments | « no previous file | components/test_runner/mock_color_chooser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698