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

Side by Side Diff: chrome/browser/ui/views/profiles/user_manager_view.cc

Issue 637083002: Sets the default background color of inline signin and user manager to grey (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui/views/profiles/user_manager_view.h" 5 #include "chrome/browser/ui/views/profiles/user_manager_view.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/lifetime/application_lifetime.h" 8 #include "chrome/browser/lifetime/application_lifetime.h"
9 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
9 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
10 #include "chrome/browser/profiles/profile_metrics.h" 11 #include "chrome/browser/profiles/profile_metrics.h"
11 #include "chrome/browser/profiles/profile_window.h" 12 #include "chrome/browser/profiles/profile_window.h"
12 #include "chrome/browser/profiles/profiles_state.h" 13 #include "chrome/browser/profiles/profiles_state.h"
13 #include "chrome/browser/ui/browser.h" 14 #include "chrome/browser/ui/browser.h"
14 #include "chrome/browser/ui/browser_dialogs.h" 15 #include "chrome/browser/ui/browser_dialogs.h"
15 #include "chrome/browser/ui/browser_finder.h" 16 #include "chrome/browser/ui/browser_finder.h"
16 #include "chrome/browser/ui/browser_window.h" 17 #include "chrome/browser/ui/browser_window.h"
17 #include "chrome/browser/ui/user_manager.h" 18 #include "chrome/browser/ui/user_manager.h"
18 #include "chrome/browser/ui/views/auto_keep_alive.h" 19 #include "chrome/browser/ui/views/auto_keep_alive.h"
19 #include "chrome/grit/chromium_strings.h" 20 #include "chrome/grit/chromium_strings.h"
21 #include "content/public/browser/render_widget_host_view.h"
20 #include "content/public/browser/web_contents.h" 22 #include "content/public/browser/web_contents.h"
21 #include "ui/base/l10n/l10n_util.h" 23 #include "ui/base/l10n/l10n_util.h"
22 #include "ui/gfx/screen.h" 24 #include "ui/gfx/screen.h"
23 #include "ui/views/controls/webview/webview.h" 25 #include "ui/views/controls/webview/webview.h"
24 #include "ui/views/layout/fill_layout.h" 26 #include "ui/views/layout/fill_layout.h"
25 #include "ui/views/view.h" 27 #include "ui/views/view.h"
26 #include "ui/views/widget/widget.h" 28 #include "ui/views/widget/widget.h"
27 #include "ui/views/window/dialog_client_view.h" 29 #include "ui/views/window/dialog_client_view.h"
28 30
29 #if defined(OS_WIN) 31 #if defined(OS_WIN)
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 GetDialogClientView()->RemoveAccelerator( 143 GetDialogClientView()->RemoveAccelerator(
142 ui::Accelerator(ui::VKEY_ESCAPE, ui::EF_NONE)); 144 ui::Accelerator(ui::VKEY_ESCAPE, ui::EF_NONE));
143 145
144 #if defined(OS_WIN) 146 #if defined(OS_WIN)
145 // Set the app id for the task manager to the app id of its parent 147 // Set the app id for the task manager to the app id of its parent
146 ui::win::SetAppIdForWindow( 148 ui::win::SetAppIdForWindow(
147 ShellIntegration::GetChromiumModelIdForProfile( 149 ShellIntegration::GetChromiumModelIdForProfile(
148 guest_profile->GetPath()), 150 guest_profile->GetPath()),
149 views::HWNDForWidget(GetWidget())); 151 views::HWNDForWidget(GetWidget()));
150 #endif 152 #endif
151 GetWidget()->Show();
152 153
153 web_view_->LoadInitialURL(url); 154 web_view_->LoadInitialURL(url);
155 content::RenderWidgetHostView* rwhv =
156 web_view_->GetWebContents()->GetRenderWidgetHostView();
157 if (rwhv)
158 rwhv->SetBackgroundColor(profiles::kUserManagerBackgroundColor);
159
154 web_view_->RequestFocus(); 160 web_view_->RequestFocus();
161
162 GetWidget()->Show();
155 } 163 }
156 164
157 bool UserManagerView::AcceleratorPressed(const ui::Accelerator& accelerator) { 165 bool UserManagerView::AcceleratorPressed(const ui::Accelerator& accelerator) {
158 int key = accelerator.key_code(); 166 int key = accelerator.key_code();
159 int modifier = accelerator.modifiers(); 167 int modifier = accelerator.modifiers();
160 DCHECK((key == ui::VKEY_W && modifier == ui::EF_CONTROL_DOWN) || 168 DCHECK((key == ui::VKEY_W && modifier == ui::EF_CONTROL_DOWN) ||
161 (key == ui::VKEY_F4 && modifier == ui::EF_ALT_DOWN)); 169 (key == ui::VKEY_F4 && modifier == ui::EF_ALT_DOWN));
162 GetWidget()->Close(); 170 GetWidget()->Close();
163 return true; 171 return true;
164 } 172 }
(...skipping 26 matching lines...) Expand all
191 // Now that the window is closed, we can allow a new one to be opened. 199 // Now that the window is closed, we can allow a new one to be opened.
192 // (WindowClosing comes in asynchronously from the call to Close() and we 200 // (WindowClosing comes in asynchronously from the call to Close() and we
193 // may have already opened a new instance). 201 // may have already opened a new instance).
194 if (instance_ == this) 202 if (instance_ == this)
195 instance_ = NULL; 203 instance_ = NULL;
196 } 204 }
197 205
198 bool UserManagerView::UseNewStyleForThisDialog() const { 206 bool UserManagerView::UseNewStyleForThisDialog() const {
199 return false; 207 return false;
200 } 208 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/profiles/profile_chooser_view.cc ('k') | content/browser/android/content_view_core_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698