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

Side by Side Diff: ash/test/material_design_controller_test_api.cc

Issue 1921133002: Adds ash::MaterialDesignController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adds ash::MaterialDesignController (CHECK_* -> DCHECK_*) Created 4 years, 7 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
« no previous file with comments | « ash/test/material_design_controller_test_api.h ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ui/base/test/material_design_controller_test_api.h" 5 #include "ash/test/material_design_controller_test_api.h"
6 6
7 namespace ui { 7 namespace ash {
8 namespace test { 8 namespace test {
9 9
10 MaterialDesignControllerTestAPI::MaterialDesignControllerTestAPI( 10 MaterialDesignControllerTestAPI::MaterialDesignControllerTestAPI(
11 MaterialDesignController::Mode mode) 11 MaterialDesignController::Mode mode)
12 : previous_mode_(MaterialDesignController::mode_), 12 : previous_mode_(MaterialDesignController::mode()) {
13 previous_initialized_(MaterialDesignController::is_mode_initialized_) {
14 MaterialDesignController::SetMode(mode); 13 MaterialDesignController::SetMode(mode);
15 } 14 }
16 15
17 MaterialDesignControllerTestAPI::~MaterialDesignControllerTestAPI() { 16 MaterialDesignControllerTestAPI::~MaterialDesignControllerTestAPI() {
18 MaterialDesignController::is_mode_initialized_ = previous_initialized_; 17 MaterialDesignController::SetMode(previous_mode_);
19 MaterialDesignController::mode_ = previous_mode_;
20 } 18 }
21 19
20 // static
21 MaterialDesignController::Mode MaterialDesignControllerTestAPI::DefaultMode() {
22 return MaterialDesignController::DefaultMode();
23 }
24
25 // static
22 void MaterialDesignControllerTestAPI::Uninitialize() { 26 void MaterialDesignControllerTestAPI::Uninitialize() {
23 MaterialDesignController::Uninitialize(); 27 MaterialDesignController::Uninitialize();
24 } 28 }
25 29
26 } // namespace test 30 } // namespace test
27 } // namespace ui 31 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/material_design_controller_test_api.h ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698