| OLD | NEW |
| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 system_profile->GetPath()), | 152 system_profile->GetPath()), |
| 153 views::HWNDForWidget(GetWidget())); | 153 views::HWNDForWidget(GetWidget())); |
| 154 #endif | 154 #endif |
| 155 | 155 |
| 156 web_view_->LoadInitialURL(url); | 156 web_view_->LoadInitialURL(url); |
| 157 content::RenderWidgetHostView* rwhv = | 157 content::RenderWidgetHostView* rwhv = |
| 158 web_view_->GetWebContents()->GetRenderWidgetHostView(); | 158 web_view_->GetWebContents()->GetRenderWidgetHostView(); |
| 159 if (rwhv) | 159 if (rwhv) |
| 160 rwhv->SetBackgroundColor(profiles::kUserManagerBackgroundColor); | 160 rwhv->SetBackgroundColor(profiles::kUserManagerBackgroundColor); |
| 161 | 161 |
| 162 GetWidget()->Show(); |
| 162 web_view_->RequestFocus(); | 163 web_view_->RequestFocus(); |
| 163 | |
| 164 GetWidget()->Show(); | |
| 165 } | 164 } |
| 166 | 165 |
| 167 bool UserManagerView::AcceleratorPressed(const ui::Accelerator& accelerator) { | 166 bool UserManagerView::AcceleratorPressed(const ui::Accelerator& accelerator) { |
| 168 int key = accelerator.key_code(); | 167 int key = accelerator.key_code(); |
| 169 int modifier = accelerator.modifiers(); | 168 int modifier = accelerator.modifiers(); |
| 170 DCHECK((key == ui::VKEY_W && modifier == ui::EF_CONTROL_DOWN) || | 169 DCHECK((key == ui::VKEY_W && modifier == ui::EF_CONTROL_DOWN) || |
| 171 (key == ui::VKEY_F4 && modifier == ui::EF_ALT_DOWN)); | 170 (key == ui::VKEY_F4 && modifier == ui::EF_ALT_DOWN)); |
| 172 GetWidget()->Close(); | 171 GetWidget()->Close(); |
| 173 return true; | 172 return true; |
| 174 } | 173 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 201 // Now that the window is closed, we can allow a new one to be opened. | 200 // 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 | 201 // (WindowClosing comes in asynchronously from the call to Close() and we |
| 203 // may have already opened a new instance). | 202 // may have already opened a new instance). |
| 204 if (instance_ == this) | 203 if (instance_ == this) |
| 205 instance_ = NULL; | 204 instance_ = NULL; |
| 206 } | 205 } |
| 207 | 206 |
| 208 bool UserManagerView::UseNewStyleForThisDialog() const { | 207 bool UserManagerView::UseNewStyleForThisDialog() const { |
| 209 return false; | 208 return false; |
| 210 } | 209 } |
| OLD | NEW |