| 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 3619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3630 } | 3630 } |
| 3631 | 3631 |
| 3632 SessionService* session_service = | 3632 SessionService* session_service = |
| 3633 SessionServiceFactory::GetForProfile(profile()); | 3633 SessionServiceFactory::GetForProfile(profile()); |
| 3634 if (session_service) { | 3634 if (session_service) { |
| 3635 // The new_contents may end up with a different navigation stack. Force | 3635 // The new_contents may end up with a different navigation stack. Force |
| 3636 // the session service to update itself. | 3636 // the session service to update itself. |
| 3637 session_service->TabRestored(new_contents, IsTabPinned(index)); | 3637 session_service->TabRestored(new_contents, IsTabPinned(index)); |
| 3638 } | 3638 } |
| 3639 | 3639 |
| 3640 content::DevToolsManager::GetInstance()->TabReplaced( | 3640 content::DevToolsManager::GetInstance()->ContentsReplaced( |
| 3641 old_contents->web_contents(), new_contents->web_contents()); | 3641 old_contents->web_contents(), new_contents->web_contents()); |
| 3642 } | 3642 } |
| 3643 | 3643 |
| 3644 void Browser::TabPinnedStateChanged(TabContentsWrapper* contents, int index) { | 3644 void Browser::TabPinnedStateChanged(TabContentsWrapper* contents, int index) { |
| 3645 SessionService* session_service = | 3645 SessionService* session_service = |
| 3646 SessionServiceFactory::GetForProfileIfExisting(profile()); | 3646 SessionServiceFactory::GetForProfileIfExisting(profile()); |
| 3647 if (session_service) { | 3647 if (session_service) { |
| 3648 session_service->SetPinnedState( | 3648 session_service->SetPinnedState( |
| 3649 session_id(), | 3649 session_id(), |
| 3650 GetTabContentsWrapperAt(index)->restore_tab_helper()->session_id(), | 3650 GetTabContentsWrapperAt(index)->restore_tab_helper()->session_id(), |
| (...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5687 ShowSingletonTabOverwritingNTP(params); | 5687 ShowSingletonTabOverwritingNTP(params); |
| 5688 } else { | 5688 } else { |
| 5689 LoginUIServiceFactory::GetForProfile( | 5689 LoginUIServiceFactory::GetForProfile( |
| 5690 profile()->GetOriginalProfile())->ShowLoginUI(false); | 5690 profile()->GetOriginalProfile())->ShowLoginUI(false); |
| 5691 } | 5691 } |
| 5692 } | 5692 } |
| 5693 | 5693 |
| 5694 void Browser::ToggleSpeechInput() { | 5694 void Browser::ToggleSpeechInput() { |
| 5695 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); | 5695 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); |
| 5696 } | 5696 } |
| OLD | NEW |