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

Side by Side Diff: chrome/browser/ui/views/login_prompt_views.cc

Issue 1395473003: Follow-up clean-up in LoginHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove accessors Created 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/login/login_prompt.h" 5 #include "chrome/browser/ui/login/login_prompt.h"
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/ui/views/login_view.h" 9 #include "chrome/browser/ui/views/login_view.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 return login_view_->GetInitiallyFocusedView(); 91 return login_view_->GetInitiallyFocusedView();
92 } 92 }
93 93
94 views::View* GetContentsView() override { return login_view_; } 94 views::View* GetContentsView() override { return login_view_; }
95 views::Widget* GetWidget() override { return login_view_->GetWidget(); } 95 views::Widget* GetWidget() override { return login_view_->GetWidget(); }
96 const views::Widget* GetWidget() const override { 96 const views::Widget* GetWidget() const override {
97 return login_view_->GetWidget(); 97 return login_view_->GetWidget();
98 } 98 }
99 99
100 // LoginHandler: 100 // LoginHandler:
101 void BuildView(const base::string16& explanation, 101 void BuildViewImpl(const base::string16& explanation,
102 LoginModelData* login_model_data) override { 102 LoginModelData* login_model_data) override {
103 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 103 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
104 104
105 // Create a new LoginView and set the model for it. The model (password 105 // Create a new LoginView and set the model for it. The model (password
106 // manager) is owned by the WebContents, but the view is parented to the 106 // manager) is owned by the WebContents, but the view is parented to the
107 // browser window, so the view may be destroyed after the password 107 // browser window, so the view may be destroyed after the password
108 // manager. The view listens for model destruction and unobserves 108 // manager. The view listens for model destruction and unobserves
109 // accordingly. 109 // accordingly.
110 login_view_ = new LoginView(explanation, login_model_data); 110 login_view_ = new LoginView(explanation, login_model_data);
111 111
112 // Scary thread safety note: This can potentially be called *after* SetAuth 112 // Scary thread safety note: This can potentially be called *after* SetAuth
(...skipping 27 matching lines...) Expand all
140 }; 140 };
141 141
142 namespace chrome { 142 namespace chrome {
143 143
144 LoginHandler* CreateLoginHandlerViews(net::AuthChallengeInfo* auth_info, 144 LoginHandler* CreateLoginHandlerViews(net::AuthChallengeInfo* auth_info,
145 net::URLRequest* request) { 145 net::URLRequest* request) {
146 return new LoginHandlerViews(auth_info, request); 146 return new LoginHandlerViews(auth_info, request);
147 } 147 }
148 148
149 } // namespace chrome 149 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/login/login_prompt.cc ('k') | components/password_manager/core/browser/password_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698