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

Side by Side Diff: components/test_runner/mock_color_chooser.cc

Issue 2707183003: Move //components/test_runner back into //content/shell (Closed)
Patch Set: Trim DEPS Created 3 years, 10 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/test_runner/mock_color_chooser.h"
6
7 #include "base/bind.h"
8 #include "components/test_runner/test_runner.h"
9 #include "components/test_runner/web_test_delegate.h"
10
11 namespace test_runner {
12
13 MockColorChooser::MockColorChooser(blink::WebColorChooserClient* client,
14 WebTestDelegate* delegate,
15 TestRunner* test_runner)
16 : client_(client),
17 delegate_(delegate),
18 test_runner_(test_runner),
19 weak_factory_(this) {
20 test_runner_->DidOpenChooser();
21 }
22
23 MockColorChooser::~MockColorChooser() {
24 test_runner_->DidCloseChooser();
25 }
26
27 void MockColorChooser::setSelectedColor(const blink::WebColor color) {}
28
29 void MockColorChooser::endChooser() {
30 delegate_->PostDelayedTask(base::Bind(&MockColorChooser::InvokeDidEndChooser,
31 weak_factory_.GetWeakPtr()),
32 0);
33 }
34
35 void MockColorChooser::InvokeDidEndChooser() {
36 client_->didEndChooser();
37 }
38
39 } // namespace test_runner
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698