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

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

Issue 7980029: Update screen locker UI to match webui login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screen_lock_view.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) 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"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/stringprintf.h" 12 #include "base/stringprintf.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/chromeos/login/helper.h"
16 #include "chrome/browser/chromeos/login/login_utils.h" 15 #include "chrome/browser/chromeos/login/login_utils.h"
17 #include "chrome/browser/chromeos/login/oobe_progress_bar.h" 16 #include "chrome/browser/chromeos/login/oobe_progress_bar.h"
18 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" 17 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h"
19 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" 18 #include "chrome/browser/chromeos/login/rounded_rect_painter.h"
20 #include "chrome/browser/chromeos/login/shutdown_button.h" 19 #include "chrome/browser/chromeos/login/shutdown_button.h"
21 #include "chrome/browser/chromeos/login/wizard_controller.h" 20 #include "chrome/browser/chromeos/login/wizard_controller.h"
22 #include "chrome/browser/chromeos/status/clock_menu_button.h" 21 #include "chrome/browser/chromeos/status/clock_menu_button.h"
23 #include "chrome/browser/chromeos/status/input_method_menu_button.h" 22 #include "chrome/browser/chromeos/status/input_method_menu_button.h"
24 #include "chrome/browser/chromeos/status/network_menu_button.h" 23 #include "chrome/browser/chromeos/status/network_menu_button.h"
25 #include "chrome/browser/chromeos/status/status_area_view.h" 24 #include "chrome/browser/chromeos/status/status_area_view.h"
(...skipping 15 matching lines...) Expand all
41 #include "views/controls/button/text_button.h" 40 #include "views/controls/button/text_button.h"
42 #include "views/controls/label.h" 41 #include "views/controls/label.h"
43 #include "views/widget/widget.h" 42 #include "views/widget/widget.h"
44 43
45 using views::Widget; 44 using views::Widget;
46 45
47 namespace { 46 namespace {
48 47
49 const SkColor kVersionColor = 0xff5c739f; 48 const SkColor kVersionColor = 0xff5c739f;
50 49
50 // Tentative background color that matches WebUI login.
51 const SkColor kBackgroundColor = 0xfff0f0f0;
52
51 // Returns the corresponding step id for step constant. 53 // Returns the corresponding step id for step constant.
52 int GetStepId(size_t step) { 54 int GetStepId(size_t step) {
53 switch (step) { 55 switch (step) {
54 case chromeos::BackgroundView::SELECT_NETWORK: 56 case chromeos::BackgroundView::SELECT_NETWORK:
55 return IDS_OOBE_SELECT_NETWORK; 57 return IDS_OOBE_SELECT_NETWORK;
56 case chromeos::BackgroundView::EULA: 58 case chromeos::BackgroundView::EULA:
57 return IDS_OOBE_EULA; 59 return IDS_OOBE_EULA;
58 case chromeos::BackgroundView::SIGNIN: 60 case chromeos::BackgroundView::SIGNIN:
59 return IDS_OOBE_SIGNIN; 61 return IDS_OOBE_SIGNIN;
60 case chromeos::BackgroundView::REGISTRATION: 62 case chromeos::BackgroundView::REGISTRATION:
(...skipping 26 matching lines...) Expand all
87 #endif 89 #endif
88 background_area_(NULL), 90 background_area_(NULL),
89 version_info_updater_(this) { 91 version_info_updater_(this) {
90 } 92 }
91 93
92 BackgroundView::~BackgroundView() { 94 BackgroundView::~BackgroundView() {
93 version_info_updater_.set_delegate(NULL); 95 version_info_updater_.set_delegate(NULL);
94 } 96 }
95 97
96 void BackgroundView::Init(const GURL& background_url) { 98 void BackgroundView::Init(const GURL& background_url) {
97 views::Painter* painter = CreateBackgroundPainter(); 99 set_background(
98 set_background(views::Background::CreateBackgroundPainter(true, painter)); 100 views::Background::CreateSolidBackground(kBackgroundColor));
99 InitStatusArea(); 101 InitStatusArea();
100 InitInfoLabels(); 102 InitInfoLabels();
101 if (!background_url.is_empty()) { 103 if (!background_url.is_empty()) {
102 Profile* profile = ProfileManager::GetDefaultProfile(); 104 Profile* profile = ProfileManager::GetDefaultProfile();
103 background_area_ = new DOMView(); 105 background_area_ = new DOMView();
104 AddChildView(background_area_); 106 AddChildView(background_area_);
105 background_area_->Init(profile, NULL); 107 background_area_->Init(profile, NULL);
106 background_area_->SetVisible(false); 108 background_area_->SetVisible(false);
107 background_area_->LoadURL(background_url); 109 background_area_->LoadURL(background_url);
108 } 110 }
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 383
382 void BackgroundView::UpdateWindowType() { 384 void BackgroundView::UpdateWindowType() {
383 std::vector<int> params; 385 std::vector<int> params;
384 WmIpc::instance()->SetWindowType( 386 WmIpc::instance()->SetWindowType(
385 GTK_WIDGET(GetNativeWindow()), 387 GTK_WIDGET(GetNativeWindow()),
386 WM_IPC_WINDOW_LOGIN_BACKGROUND, 388 WM_IPC_WINDOW_LOGIN_BACKGROUND,
387 &params); 389 &params);
388 } 390 }
389 391
390 } // namespace chromeos 392 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screen_lock_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698