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

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

Issue 8770012: Override status area window type for WebUI lock screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « chrome/browser/chromeos/login/webui_screen_locker.h ('k') | no next file » | 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) 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/webui_screen_locker.h" 5 #include "chrome/browser/chromeos/login/webui_screen_locker.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chromeos/cros/cros_library.h" 10 #include "chrome/browser/chromeos/cros/cros_library.h"
11 #include "chrome/browser/chromeos/cros/network_library.h" 11 #include "chrome/browser/chromeos/cros/network_library.h"
12 #include "chrome/browser/chromeos/legacy_window_manager/wm_ipc.h" 12 #include "chrome/browser/chromeos/legacy_window_manager/wm_ipc.h"
13 #include "chrome/browser/chromeos/login/helper.h" 13 #include "chrome/browser/chromeos/login/helper.h"
14 #include "chrome/browser/chromeos/login/screen_locker.h" 14 #include "chrome/browser/chromeos/login/screen_locker.h"
15 #include "chrome/browser/chromeos/login/user_manager.h" 15 #include "chrome/browser/chromeos/login/user_manager.h"
16 #include "chrome/browser/chromeos/login/webui_login_display.h" 16 #include "chrome/browser/chromeos/login/webui_login_display.h"
17 #include "chrome/browser/chromeos/status/status_area_view_chromeos.h"
17 #include "chrome/browser/ui/views/dom_view.h" 18 #include "chrome/browser/ui/views/dom_view.h"
18 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 19 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
19 #include "chrome/common/chrome_notification_types.h" 20 #include "chrome/common/chrome_notification_types.h"
20 #include "chrome/common/url_constants.h" 21 #include "chrome/common/url_constants.h"
21 #include "content/browser/renderer_host/render_widget_host_view.h" 22 #include "content/browser/renderer_host/render_widget_host_view.h"
22 #include "content/public/browser/notification_service.h" 23 #include "content/public/browser/notification_service.h"
23 #include "content/public/browser/notification_types.h" 24 #include "content/public/browser/notification_types.h"
24 #include "ui/base/l10n/l10n_util.h" 25 #include "ui/base/l10n/l10n_util.h"
25 #include "ui/base/x/x11_util.h" 26 #include "ui/base/x/x11_util.h"
26 #include "ui/gfx/screen.h" 27 #include "ui/gfx/screen.h"
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 NOTREACHED(); 448 NOTREACHED();
448 } 449 }
449 450
450 void WebUIScreenLocker::OnUserSelected(const std::string& username) { 451 void WebUIScreenLocker::OnUserSelected(const std::string& username) {
451 } 452 }
452 453
453 void WebUIScreenLocker::OnStartEnterpriseEnrollment() { 454 void WebUIScreenLocker::OnStartEnterpriseEnrollment() {
454 NOTREACHED(); 455 NOTREACHED();
455 } 456 }
456 457
458 ////////////////////////////////////////////////////////////////////////////////
459 // WebUIScreenLocker, protected:
460
461 void WebUIScreenLocker::Layout() {
462 const int kCornerPadding = 5;
463 WebUILoginView::Layout();
464 if (status_area_) {
465 gfx::Size status_area_size = status_area_->GetPreferredSize();
466 status_area_->SetBounds(
467 width() - status_area_size.width() - kCornerPadding,
468 kCornerPadding,
469 status_area_size.width(),
470 status_area_size.height());
471 }
472 }
473
474 void WebUIScreenLocker::InitStatusArea() {
475 DCHECK(status_area_ == NULL);
476 status_area_ = new StatusAreaViewChromeos();
477 status_area_->Init(this);
478 AddChildView(status_area_);
479 status_area_->SetPaintToLayer(true);
Nikita (slow) 2011/12/08 14:13:12 I see that you're adding status_area_ as a child v
flackr 2011/12/08 14:50:08 No, this didn't work.
480 Layout();
481 }
482
457 } // namespace chromeos 483 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/webui_screen_locker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698