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 #include "chrome/browser/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 | 454 |
455 profile_pref_registrar_.RemoveAll(); | 455 profile_pref_registrar_.RemoveAll(); |
456 local_pref_registrar_.RemoveAll(); | 456 local_pref_registrar_.RemoveAll(); |
457 | 457 |
458 encoding_auto_detect_.Destroy(); | 458 encoding_auto_detect_.Destroy(); |
459 | 459 |
460 if (profile_->IsOffTheRecord() && | 460 if (profile_->IsOffTheRecord() && |
461 !BrowserList::IsOffTheRecordSessionActiveForProfile(profile_)) { | 461 !BrowserList::IsOffTheRecordSessionActiveForProfile(profile_)) { |
462 // An incognito profile is no longer needed, this indirectly frees | 462 // An incognito profile is no longer needed, this indirectly frees |
463 // its cache and cookies once it gets destroyed at the appropriate time. | 463 // its cache and cookies once it gets destroyed at the appropriate time. |
464 ProfileDestroyer::DestroyOffTheRecordProfile(profile_); | 464 ProfileDestroyer::DestroyProfileWhenAppropriate(profile_); |
465 } | 465 } |
466 | 466 |
467 // There may be pending file dialogs, we need to tell them that we've gone | 467 // There may be pending file dialogs, we need to tell them that we've gone |
468 // away so they don't try and call back to us. | 468 // away so they don't try and call back to us. |
469 if (select_file_dialog_.get()) | 469 if (select_file_dialog_.get()) |
470 select_file_dialog_->ListenerDestroyed(); | 470 select_file_dialog_->ListenerDestroyed(); |
471 | 471 |
472 TabRestoreServiceDestroyed(tab_restore_service_); | 472 TabRestoreServiceDestroyed(tab_restore_service_); |
473 } | 473 } |
474 | 474 |
(...skipping 5075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5550 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; | 5550 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; |
5551 ShowSingletonTabOverwritingNTP(params); | 5551 ShowSingletonTabOverwritingNTP(params); |
5552 } else { | 5552 } else { |
5553 service->ShowLoginDialog(); | 5553 service->ShowLoginDialog(); |
5554 } | 5554 } |
5555 } | 5555 } |
5556 | 5556 |
5557 void Browser::ToggleSpeechInput() { | 5557 void Browser::ToggleSpeechInput() { |
5558 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); | 5558 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); |
5559 } | 5559 } |
OLD | NEW |