| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 3375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3386 SessionService* session_service = | 3386 SessionService* session_service = |
| 3387 SessionServiceFactory::GetForProfile(profile()); | 3387 SessionServiceFactory::GetForProfile(profile()); |
| 3388 if (session_service) { | 3388 if (session_service) { |
| 3389 // The new_contents may end up with a different navigation stack. Force | 3389 // The new_contents may end up with a different navigation stack. Force |
| 3390 // the session service to update itself. | 3390 // the session service to update itself. |
| 3391 session_service->TabRestored( | 3391 session_service->TabRestored( |
| 3392 new_contents, tab_handler_->GetTabStripModel()->IsTabPinned(index)); | 3392 new_contents, tab_handler_->GetTabStripModel()->IsTabPinned(index)); |
| 3393 } | 3393 } |
| 3394 | 3394 |
| 3395 content::DevToolsManager::GetInstance()->TabReplaced( | 3395 content::DevToolsManager::GetInstance()->TabReplaced( |
| 3396 old_contents->tab_contents(), new_contents->tab_contents()); | 3396 old_contents->web_contents(), new_contents->tab_contents()); |
| 3397 } | 3397 } |
| 3398 | 3398 |
| 3399 void Browser::TabPinnedStateChanged(TabContentsWrapper* contents, int index) { | 3399 void Browser::TabPinnedStateChanged(TabContentsWrapper* contents, int index) { |
| 3400 SessionService* session_service = | 3400 SessionService* session_service = |
| 3401 SessionServiceFactory::GetForProfileIfExisting(profile()); | 3401 SessionServiceFactory::GetForProfileIfExisting(profile()); |
| 3402 if (session_service) { | 3402 if (session_service) { |
| 3403 session_service->SetPinnedState( | 3403 session_service->SetPinnedState( |
| 3404 session_id(), | 3404 session_id(), |
| 3405 GetTabContentsWrapperAt(index)->restore_tab_helper()->session_id(), | 3405 GetTabContentsWrapperAt(index)->restore_tab_helper()->session_id(), |
| 3406 tab_handler_->GetTabStripModel()->IsTabPinned(index)); | 3406 tab_handler_->GetTabStripModel()->IsTabPinned(index)); |
| (...skipping 1984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5391 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); | 5391 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); |
| 5392 } else { | 5392 } else { |
| 5393 GlobalErrorService* service = | 5393 GlobalErrorService* service = |
| 5394 GlobalErrorServiceFactory::GetForProfile(profile()); | 5394 GlobalErrorServiceFactory::GetForProfile(profile()); |
| 5395 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5395 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
| 5396 if (error) { | 5396 if (error) { |
| 5397 error->ShowBubbleView(this); | 5397 error->ShowBubbleView(this); |
| 5398 } | 5398 } |
| 5399 } | 5399 } |
| 5400 } | 5400 } |
| OLD | NEW |