Chromium Code Reviews| 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 "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/lifetime/application_lifetime.h" | 10 #include "chrome/browser/lifetime/application_lifetime.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 // views::DialogDelegate: | 68 // views::DialogDelegate: |
| 69 gfx::Size GetPreferredSize() const override; | 69 gfx::Size GetPreferredSize() const override; |
| 70 bool CanResize() const override; | 70 bool CanResize() const override; |
| 71 bool CanMaximize() const override; | 71 bool CanMaximize() const override; |
| 72 bool CanMinimize() const override; | 72 bool CanMinimize() const override; |
| 73 bool UseNewStyleForThisDialog() const override; | 73 bool UseNewStyleForThisDialog() const override; |
| 74 ui::ModalType GetModalType() const override; | 74 ui::ModalType GetModalType() const override; |
| 75 void DeleteDelegate() override; | 75 void DeleteDelegate() override; |
| 76 base::string16 GetWindowTitle() const override; | 76 base::string16 GetWindowTitle() const override; |
| 77 int GetDialogButtons() const override; | 77 int GetDialogButtons() const override; |
| 78 views::View* GetInitiallyFocusedView() override; | |
| 78 | 79 |
| 79 // UserManager::ReauthObserver: | 80 // UserManager::ReauthObserver: |
| 80 void CloseReauthDialog() override; | 81 void CloseReauthDialog() override; |
| 81 | 82 |
| 82 views::WebView* web_view_; | 83 views::WebView* web_view_; |
| 83 const std::string email_address_; | 84 const std::string email_address_; |
| 84 | 85 |
| 85 DISALLOW_COPY_AND_ASSIGN(ReauthDelegate); | 86 DISALLOW_COPY_AND_ASSIGN(ReauthDelegate); |
| 86 }; | 87 }; |
| 87 | 88 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 } | 132 } |
| 132 | 133 |
| 133 base::string16 ReauthDelegate::GetWindowTitle() const { | 134 base::string16 ReauthDelegate::GetWindowTitle() const { |
| 134 return l10n_util::GetStringUTF16(IDS_PROFILES_GAIA_SIGNIN_TITLE); | 135 return l10n_util::GetStringUTF16(IDS_PROFILES_GAIA_SIGNIN_TITLE); |
| 135 } | 136 } |
| 136 | 137 |
| 137 int ReauthDelegate::GetDialogButtons() const { | 138 int ReauthDelegate::GetDialogButtons() const { |
| 138 return ui::DIALOG_BUTTON_NONE; | 139 return ui::DIALOG_BUTTON_NONE; |
| 139 } | 140 } |
| 140 | 141 |
| 142 views::View* ReauthDelegate::GetInitiallyFocusedView() { | |
| 143 return static_cast<views::View*>(web_view_); | |
|
sky
2015/09/14 22:49:50
You shouldn't need the static_cast. web_view_ is a
| |
| 144 } | |
| 145 | |
| 141 void ReauthDelegate::CloseReauthDialog() { | 146 void ReauthDelegate::CloseReauthDialog() { |
| 142 GetWidget()->Close(); | 147 GetWidget()->Close(); |
| 143 } | 148 } |
| 144 | 149 |
| 145 } // namespace | 150 } // namespace |
| 146 | 151 |
| 147 // UserManager ----------------------------------------------------------------- | 152 // UserManager ----------------------------------------------------------------- |
| 148 | 153 |
| 149 // static | 154 // static |
| 150 void UserManager::Show( | 155 void UserManager::Show( |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 367 // Now that the window is closed, we can allow a new one to be opened. | 372 // Now that the window is closed, we can allow a new one to be opened. |
| 368 // (WindowClosing comes in asynchronously from the call to Close() and we | 373 // (WindowClosing comes in asynchronously from the call to Close() and we |
| 369 // may have already opened a new instance). | 374 // may have already opened a new instance). |
| 370 if (instance_ == this) | 375 if (instance_ == this) |
| 371 instance_ = NULL; | 376 instance_ = NULL; |
| 372 } | 377 } |
| 373 | 378 |
| 374 bool UserManagerView::UseNewStyleForThisDialog() const { | 379 bool UserManagerView::UseNewStyleForThisDialog() const { |
| 375 return false; | 380 return false; |
| 376 } | 381 } |
| OLD | NEW |