OLD | NEW |
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 #import "chrome/browser/app_controller_mac.h" | 5 #import "chrome/browser/app_controller_mac.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 } | 237 } |
238 | 238 |
239 virtual ~AppControllerProfileObserver() { | 239 virtual ~AppControllerProfileObserver() { |
240 DCHECK(profile_manager_); | 240 DCHECK(profile_manager_); |
241 profile_manager_->GetProfileInfoCache().RemoveObserver(this); | 241 profile_manager_->GetProfileInfoCache().RemoveObserver(this); |
242 } | 242 } |
243 | 243 |
244 private: | 244 private: |
245 // ProfileInfoCacheObserver implementation: | 245 // ProfileInfoCacheObserver implementation: |
246 | 246 |
247 virtual void OnProfileAdded(const base::FilePath& profile_path) OVERRIDE { | 247 virtual void OnProfileAdded(const base::FilePath& profile_path) override { |
248 } | 248 } |
249 | 249 |
250 virtual void OnProfileWasRemoved( | 250 virtual void OnProfileWasRemoved( |
251 const base::FilePath& profile_path, | 251 const base::FilePath& profile_path, |
252 const base::string16& profile_name) OVERRIDE { | 252 const base::string16& profile_name) override { |
253 // When a profile is deleted we need to notify the AppController, | 253 // When a profile is deleted we need to notify the AppController, |
254 // so it can correctly update its pointer to the last used profile. | 254 // so it can correctly update its pointer to the last used profile. |
255 [app_controller_ profileWasRemoved:profile_path]; | 255 [app_controller_ profileWasRemoved:profile_path]; |
256 } | 256 } |
257 | 257 |
258 virtual void OnProfileWillBeRemoved( | 258 virtual void OnProfileWillBeRemoved( |
259 const base::FilePath& profile_path) OVERRIDE { | 259 const base::FilePath& profile_path) override { |
260 } | 260 } |
261 | 261 |
262 virtual void OnProfileNameChanged( | 262 virtual void OnProfileNameChanged( |
263 const base::FilePath& profile_path, | 263 const base::FilePath& profile_path, |
264 const base::string16& old_profile_name) OVERRIDE { | 264 const base::string16& old_profile_name) override { |
265 } | 265 } |
266 | 266 |
267 virtual void OnProfileAvatarChanged( | 267 virtual void OnProfileAvatarChanged( |
268 const base::FilePath& profile_path) OVERRIDE { | 268 const base::FilePath& profile_path) override { |
269 } | 269 } |
270 | 270 |
271 ProfileManager* profile_manager_; | 271 ProfileManager* profile_manager_; |
272 | 272 |
273 AppController* app_controller_; // Weak; owns us. | 273 AppController* app_controller_; // Weak; owns us. |
274 | 274 |
275 DISALLOW_COPY_AND_ASSIGN(AppControllerProfileObserver); | 275 DISALLOW_COPY_AND_ASSIGN(AppControllerProfileObserver); |
276 }; | 276 }; |
277 | 277 |
278 @implementation AppController | 278 @implementation AppController |
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1580 | 1580 |
1581 //--------------------------------------------------------------------------- | 1581 //--------------------------------------------------------------------------- |
1582 | 1582 |
1583 namespace app_controller_mac { | 1583 namespace app_controller_mac { |
1584 | 1584 |
1585 bool IsOpeningNewWindow() { | 1585 bool IsOpeningNewWindow() { |
1586 return g_is_opening_new_window; | 1586 return g_is_opening_new_window; |
1587 } | 1587 } |
1588 | 1588 |
1589 } // namespace app_controller_mac | 1589 } // namespace app_controller_mac |
OLD | NEW |