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

Side by Side Diff: chrome/browser/chromeos/login/background_view.cc

Issue 8930001: Fix up status area clock code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 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 | Annotate | Revision Log
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/background_view.h" 5 #include "chrome/browser/chromeos/login/background_view.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 184 }
185 185
186 bool BackgroundView::IsScreenSaverVisible() { 186 bool BackgroundView::IsScreenSaverVisible() {
187 return ScreenSaverEnabled() && background_area_->visible(); 187 return ScreenSaverEnabled() && background_area_->visible();
188 } 188 }
189 189
190 bool BackgroundView::ScreenSaverEnabled() { 190 bool BackgroundView::ScreenSaverEnabled() {
191 return background_area_ != NULL; 191 return background_area_ != NULL;
192 } 192 }
193 193
194 void BackgroundView::SetDefaultUse24HourClock(bool use_24hour_clock) {
195 DCHECK(status_area_);
196 status_area_->SetDefaultUse24HourClock(use_24hour_clock);
197 }
198
199 /////////////////////////////////////////////////////////////////////////////// 194 ///////////////////////////////////////////////////////////////////////////////
200 // BackgroundView protected: 195 // BackgroundView protected:
201 196
202 void BackgroundView::Layout() { 197 void BackgroundView::Layout() {
203 const int kCornerPadding = 5; 198 const int kCornerPadding = 5;
204 const int kInfoLeftPadding = 10; 199 const int kInfoLeftPadding = 10;
205 const int kInfoBottomPadding = 10; 200 const int kInfoBottomPadding = 10;
206 const int kInfoBetweenLinesPadding = 1; 201 const int kInfoBetweenLinesPadding = 1;
207 gfx::Size status_area_size = status_area_->GetPreferredSize(); 202 gfx::Size status_area_size = status_area_->GetPreferredSize();
208 status_area_->SetBounds( 203 status_area_->SetBounds(
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 #if defined(TOOLKIT_USES_GTK) 331 #if defined(TOOLKIT_USES_GTK)
337 std::vector<int> params; 332 std::vector<int> params;
338 WmIpc::instance()->SetWindowType( 333 WmIpc::instance()->SetWindowType(
339 GTK_WIDGET(GetNativeWindow()), 334 GTK_WIDGET(GetNativeWindow()),
340 WM_IPC_WINDOW_LOGIN_BACKGROUND, 335 WM_IPC_WINDOW_LOGIN_BACKGROUND,
341 &params); 336 &params);
342 #endif 337 #endif
343 } 338 }
344 339
345 } // namespace chromeos 340 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698