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 "chrome/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/profiles/profile_manager.h" | 9 #include "chrome/browser/profiles/profile_manager.h" |
10 #include "chrome/browser/ui/browser_dialogs.h" | 10 #include "chrome/browser/ui/browser_dialogs.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 return self; | 133 return self; |
134 } | 134 } |
135 | 135 |
136 - (void)dealloc { | 136 - (void)dealloc { |
137 [[NSNotificationCenter defaultCenter] removeObserver:self]; | 137 [[NSNotificationCenter defaultCenter] removeObserver:self]; |
138 [super dealloc]; | 138 [super dealloc]; |
139 } | 139 } |
140 | 140 |
141 - (void)showURL:(const GURL&)url { | 141 - (void)showURL:(const GURL&)url { |
142 webContents_->GetController().LoadURL(url, content::Referrer(), | 142 webContents_->GetController().LoadURL(url, content::Referrer(), |
143 content::PAGE_TRANSITION_AUTO_TOPLEVEL, | 143 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, |
144 std::string()); | 144 std::string()); |
145 [self show]; | 145 [self show]; |
146 } | 146 } |
147 | 147 |
148 - (void)show { | 148 - (void)show { |
149 [[self window] makeKeyAndOrderFront:self]; | 149 [[self window] makeKeyAndOrderFront:self]; |
150 } | 150 } |
151 | 151 |
152 - (void)close { | 152 - (void)close { |
153 [[self window] close]; | 153 [[self window] close]; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 void UserManagerMac::OnGuestProfileCreated(Profile* guest_profile, | 208 void UserManagerMac::OnGuestProfileCreated(Profile* guest_profile, |
209 const std::string& url) { | 209 const std::string& url) { |
210 instance_ = new UserManagerMac(guest_profile); | 210 instance_ = new UserManagerMac(guest_profile); |
211 [instance_->window_controller_ showURL:GURL(url)]; | 211 [instance_->window_controller_ showURL:GURL(url)]; |
212 } | 212 } |
213 | 213 |
214 void UserManagerMac::WindowWasClosed() { | 214 void UserManagerMac::WindowWasClosed() { |
215 instance_ = NULL; | 215 instance_ = NULL; |
216 delete this; | 216 delete this; |
217 } | 217 } |
OLD | NEW |