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

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

Issue 2556253002: cros: Fold EulaModel into EulaView. (Closed)
Patch Set: Address comments 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 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::_; 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 EulaView* view) 14 EulaView* view)
15 : EulaScreen(base_screen_delegate, delegate, view) { 15 : EulaScreen(base_screen_delegate, delegate, view) {
16 } 16 }
17 17
18 MockEulaScreen::~MockEulaScreen() { 18 MockEulaScreen::~MockEulaScreen() {
19 } 19 }
20 20
21 MockEulaView::MockEulaView() { 21 MockEulaView::MockEulaView() {
22 EXPECT_CALL(*this, MockBind(_)).Times(AtLeast(1)); 22 EXPECT_CALL(*this, MockBind(_)).Times(AtLeast(1));
23 } 23 }
24 24
25 MockEulaView::~MockEulaView() { 25 MockEulaView::~MockEulaView() {
26 if (model_) 26 if (screen_)
27 model_->OnViewDestroyed(this); 27 screen_->OnViewDestroyed(this);
28 } 28 }
29 29
30 void MockEulaView::Bind(EulaModel& model) { 30 void MockEulaView::Bind(EulaScreen* screen) {
31 model_ = &model; 31 screen_ = screen;
32 MockBind(model); 32 MockBind(screen);
33 } 33 }
34 34
35 void MockEulaView::Unbind() { 35 void MockEulaView::Unbind() {
36 model_ = nullptr; 36 screen_ = nullptr;
37 MockUnbind(); 37 MockUnbind();
38 } 38 }
39 39
40 } // namespace chromeos 40 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/mock_eula_screen.h ('k') | chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698