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

Side by Side Diff: chrome/browser/chromeos/login/screens/mock_eula_screen.cc

Issue 755203002: Added usage of ScreenContext in EulaScreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase, fix to Screen.initialize(). Created 6 years 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/login/screens/mock_eula_screen.h" 5 #include "chrome/browser/chromeos/login/screens/mock_eula_screen.h"
6 6
7 namespace chromeos { 7 namespace chromeos {
8 8
9 using ::testing::AtLeast; 9 using ::testing::AtLeast;
10 using ::testing::NotNull; 10 using ::testing::_;
11 11
12 MockEulaScreen::MockEulaScreen(BaseScreenDelegate* base_screen_delegate, 12 MockEulaScreen::MockEulaScreen(BaseScreenDelegate* base_screen_delegate,
13 Delegate* delegate, 13 Delegate* delegate,
14 EulaScreenActor* actor) 14 EulaView* view)
15 : EulaScreen(base_screen_delegate, delegate, actor) { 15 : EulaScreen(base_screen_delegate, delegate, view) {
16 } 16 }
17 17
18 MockEulaScreen::~MockEulaScreen() { 18 MockEulaScreen::~MockEulaScreen() {
19 } 19 }
20 20
21 MockEulaScreenActor::MockEulaScreenActor() { 21 MockEulaView::MockEulaView() {
22 EXPECT_CALL(*this, MockSetDelegate(NotNull())).Times(AtLeast(1)); 22 EXPECT_CALL(*this, MockBind(_)).Times(AtLeast(1));
23 } 23 }
24 24
25 MockEulaScreenActor::~MockEulaScreenActor() { 25 MockEulaView::~MockEulaView() {
26 if (delegate_) 26 if (model_)
27 delegate_->OnActorDestroyed(this); 27 model_->OnViewDestroyed(this);
28 } 28 }
29 29
30 void MockEulaScreenActor::SetDelegate(Delegate* delegate) { 30 void MockEulaView::Bind(EulaModel& model) {
31 delegate_ = delegate; 31 model_ = &model;
32 MockSetDelegate(delegate); 32 MockBind(model);
33 }
34
35 void MockEulaView::Unbind() {
36 model_ = nullptr;
37 MockUnbind();
33 } 38 }
34 39
35 } // namespace chromeos 40 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/mock_eula_screen.h ('k') | chrome/browser/chromeos/login/ui/oobe_display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698