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

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

Issue 891173005: [Metro] Set a shelf icon for the user manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | 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 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_avatar_icon_util.h"
10 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
(...skipping 16 matching lines...) Expand all
27 #include "ui/views/view.h" 27 #include "ui/views/view.h"
28 #include "ui/views/widget/widget.h" 28 #include "ui/views/widget/widget.h"
29 #include "ui/views/window/dialog_client_view.h" 29 #include "ui/views/window/dialog_client_view.h"
30 30
31 #if defined(OS_WIN) 31 #if defined(OS_WIN)
32 #include "chrome/browser/shell_integration.h" 32 #include "chrome/browser/shell_integration.h"
33 #include "ui/base/win/shell.h" 33 #include "ui/base/win/shell.h"
34 #include "ui/views/win/hwnd_util.h" 34 #include "ui/views/win/hwnd_util.h"
35 #endif 35 #endif
36 36
37 #if defined(USE_ASH)
38 #include "ash/shelf/shelf_util.h"
39 #include "ash/wm/window_util.h"
40 #include "grit/ash_resources.h"
41 #endif
42
37 namespace { 43 namespace {
38 44
39 // An open User Manager window. There can only be one open at a time. This 45 // An open User Manager window. There can only be one open at a time. This
40 // is reset to NULL when the window is closed. 46 // is reset to NULL when the window is closed.
41 UserManagerView* instance_ = NULL; 47 UserManagerView* instance_ = NULL;
42 48
43 } // namespace 49 } // namespace
44 50
45 // UserManager ----------------------------------------------------------------- 51 // UserManager -----------------------------------------------------------------
46 52
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 ui::Accelerator(ui::VKEY_ESCAPE, ui::EF_NONE)); 152 ui::Accelerator(ui::VKEY_ESCAPE, ui::EF_NONE));
147 153
148 #if defined(OS_WIN) 154 #if defined(OS_WIN)
149 // Set the app id for the task manager to the app id of its parent 155 // Set the app id for the task manager to the app id of its parent
150 ui::win::SetAppIdForWindow( 156 ui::win::SetAppIdForWindow(
151 ShellIntegration::GetChromiumModelIdForProfile( 157 ShellIntegration::GetChromiumModelIdForProfile(
152 system_profile->GetPath()), 158 system_profile->GetPath()),
153 views::HWNDForWidget(GetWidget())); 159 views::HWNDForWidget(GetWidget()));
154 #endif 160 #endif
155 161
162 #if defined(USE_ASH)
163 gfx::NativeWindow native_window = GetWidget()->GetNativeWindow();
164 ash::SetShelfItemDetailsForDialogWindow(
165 native_window, IDR_ASH_SHELF_LIST_BROWSER, native_window->title());
166 #endif
167
156 web_view_->LoadInitialURL(url); 168 web_view_->LoadInitialURL(url);
157 content::RenderWidgetHostView* rwhv = 169 content::RenderWidgetHostView* rwhv =
158 web_view_->GetWebContents()->GetRenderWidgetHostView(); 170 web_view_->GetWebContents()->GetRenderWidgetHostView();
159 if (rwhv) 171 if (rwhv)
160 rwhv->SetBackgroundColor(profiles::kUserManagerBackgroundColor); 172 rwhv->SetBackgroundColor(profiles::kUserManagerBackgroundColor);
161 173
162 web_view_->RequestFocus(); 174 web_view_->RequestFocus();
163 175
164 GetWidget()->Show(); 176 GetWidget()->Show();
165 } 177 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // Now that the window is closed, we can allow a new one to be opened. 213 // Now that the window is closed, we can allow a new one to be opened.
202 // (WindowClosing comes in asynchronously from the call to Close() and we 214 // (WindowClosing comes in asynchronously from the call to Close() and we
203 // may have already opened a new instance). 215 // may have already opened a new instance).
204 if (instance_ == this) 216 if (instance_ == this)
205 instance_ = NULL; 217 instance_ = NULL;
206 } 218 }
207 219
208 bool UserManagerView::UseNewStyleForThisDialog() const { 220 bool UserManagerView::UseNewStyleForThisDialog() const {
209 return false; 221 return false;
210 } 222 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698