| 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/cocoa/profiles/user_manager_mac.h" | 5 #include "chrome/browser/ui/cocoa/profiles/user_manager_mac.h" |
| 6 | 6 |
| 7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
| 8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
| 9 #import "chrome/browser/app_controller_mac.h" | 9 #import "chrome/browser/app_controller_mac.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 isTextEditingCommand) { | 135 isTextEditingCommand) { |
| 136 [[NSApp mainMenu] performKeyEquivalent:event.os_event]; | 136 [[NSApp mainMenu] performKeyEquivalent:event.os_event]; |
| 137 } | 137 } |
| 138 } | 138 } |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 class ReauthDialogDelegate : public UserManager::ReauthDialogObserver, | 141 class ReauthDialogDelegate : public UserManager::ReauthDialogObserver, |
| 142 public UserManagerWebContentsDelegate, | 142 public UserManagerWebContentsDelegate, |
| 143 public ConstrainedWindowMacDelegate { | 143 public ConstrainedWindowMacDelegate { |
| 144 public: | 144 public: |
| 145 ReauthDialogDelegate(content::WebContents* web_contents, std::string email) | 145 ReauthDialogDelegate(content::WebContents* web_contents, |
| 146 const std::string& email) |
| 146 : UserManager::ReauthDialogObserver(web_contents, email) {} | 147 : UserManager::ReauthDialogObserver(web_contents, email) {} |
| 147 | 148 |
| 148 // UserManager::ReauthDialogObserver: | 149 // UserManager::ReauthDialogObserver: |
| 149 void CloseReauthDialog() override { | 150 void CloseReauthDialog() override { |
| 150 CloseInstanceReauthDialog(); | 151 CloseInstanceReauthDialog(); |
| 151 } | 152 } |
| 152 | 153 |
| 153 // ConstrainedWindowMacDelegate: | 154 // ConstrainedWindowMacDelegate: |
| 154 void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override { | 155 void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override { |
| 155 CloseReauthDialog(); | 156 CloseReauthDialog(); |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 ProfileMetrics::LogTimeToOpenUserManager( | 472 ProfileMetrics::LogTimeToOpenUserManager( |
| 472 base::Time::Now() - user_manager_started_showing_); | 473 base::Time::Now() - user_manager_started_showing_); |
| 473 user_manager_started_showing_ = base::Time(); | 474 user_manager_started_showing_ = base::Time(); |
| 474 } | 475 } |
| 475 | 476 |
| 476 void UserManagerMac::WindowWasClosed() { | 477 void UserManagerMac::WindowWasClosed() { |
| 477 CloseReauthDialog(); | 478 CloseReauthDialog(); |
| 478 instance_ = NULL; | 479 instance_ = NULL; |
| 479 delete this; | 480 delete this; |
| 480 } | 481 } |
| OLD | NEW |