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

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

Issue 964503002: Implemented ForceMaximizeBrowserWindowOnFirstRun policy, added unit test and browser test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/test_shell_delegate.h ('k') | ash/wm/window_positioner.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/test/test_shell_delegate.h" 5 #include "ash/test/test_shell_delegate.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "ash/default_accessibility_delegate.h" 9 #include "ash/default_accessibility_delegate.h"
10 #include "ash/gpu_support_stub.h" 10 #include "ash/gpu_support_stub.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 MediaCaptureState state_; 75 MediaCaptureState state_;
76 76
77 DISALLOW_COPY_AND_ASSIGN(MediaDelegateImpl); 77 DISALLOW_COPY_AND_ASSIGN(MediaDelegateImpl);
78 }; 78 };
79 79
80 } // namespace 80 } // namespace
81 81
82 TestShellDelegate::TestShellDelegate() 82 TestShellDelegate::TestShellDelegate()
83 : num_exit_requests_(0), 83 : num_exit_requests_(0),
84 multi_profiles_enabled_(false), 84 multi_profiles_enabled_(false),
85 force_maximize_on_first_run_(false),
85 test_session_state_delegate_(NULL) { 86 test_session_state_delegate_(NULL) {
86 } 87 }
87 88
88 TestShellDelegate::~TestShellDelegate() { 89 TestShellDelegate::~TestShellDelegate() {
89 } 90 }
90 91
91 bool TestShellDelegate::IsFirstRunAfterBoot() const { 92 bool TestShellDelegate::IsFirstRunAfterBoot() const {
92 return false; 93 return false;
93 } 94 }
94 95
95 bool TestShellDelegate::IsIncognitoAllowed() const { 96 bool TestShellDelegate::IsIncognitoAllowed() const {
96 return true; 97 return true;
97 } 98 }
98 99
99 bool TestShellDelegate::IsMultiProfilesEnabled() const { 100 bool TestShellDelegate::IsMultiProfilesEnabled() const {
100 return multi_profiles_enabled_; 101 return multi_profiles_enabled_;
101 } 102 }
102 103
103 bool TestShellDelegate::IsRunningInForcedAppMode() const { 104 bool TestShellDelegate::IsRunningInForcedAppMode() const {
104 return false; 105 return false;
105 } 106 }
106 107
107 bool TestShellDelegate::IsMultiAccountEnabled() const { 108 bool TestShellDelegate::IsMultiAccountEnabled() const {
108 return false; 109 return false;
109 } 110 }
110 111
112 bool TestShellDelegate::IsForceMaximizeOnFirstRun() const {
113 return force_maximize_on_first_run_;
114 }
115
111 void TestShellDelegate::PreInit() { 116 void TestShellDelegate::PreInit() {
112 } 117 }
113 118
114 void TestShellDelegate::PreShutdown() { 119 void TestShellDelegate::PreShutdown() {
115 } 120 }
116 121
117 void TestShellDelegate::Exit() { 122 void TestShellDelegate::Exit() {
118 num_exit_requests_++; 123 num_exit_requests_++;
119 } 124 }
120 125
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 #if defined(OS_CHROMEOS) 203 #if defined(OS_CHROMEOS)
199 Shell* shell = Shell::GetInstance(); 204 Shell* shell = Shell::GetInstance();
200 static_cast<MediaDelegateImpl*>(shell->media_delegate()) 205 static_cast<MediaDelegateImpl*>(shell->media_delegate())
201 ->set_media_capture_state(state); 206 ->set_media_capture_state(state);
202 shell->system_tray_notifier()->NotifyMediaCaptureChanged(); 207 shell->system_tray_notifier()->NotifyMediaCaptureChanged();
203 #endif 208 #endif
204 } 209 }
205 210
206 } // namespace test 211 } // namespace test
207 } // namespace ash 212 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/test_shell_delegate.h ('k') | ash/wm/window_positioner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698