| 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/sessions/session_restore.h" | 5 #include "chrome/browser/sessions/session_restore.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 #if defined(OS_CHROMEOS) | 53 #if defined(OS_CHROMEOS) |
| 54 #include "chrome/browser/chromeos/boot_times_loader.h" | 54 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 55 #endif | 55 #endif |
| 56 | 56 |
| 57 #if defined(OS_WIN) | 57 #if defined(OS_WIN) |
| 58 #include "win8/util/win8_util.h" | 58 #include "win8/util/win8_util.h" |
| 59 #endif | 59 #endif |
| 60 | 60 |
| 61 #if defined(USE_ASH) | 61 #if defined(USE_ASH) |
| 62 #include "ash/wm/window_settings.h" | 62 #include "ash/wm/window_state.h" |
| 63 #endif | 63 #endif |
| 64 using content::NavigationController; | 64 using content::NavigationController; |
| 65 using content::RenderWidgetHost; | 65 using content::RenderWidgetHost; |
| 66 using content::WebContents; | 66 using content::WebContents; |
| 67 | 67 |
| 68 namespace { | 68 namespace { |
| 69 | 69 |
| 70 class SessionRestoreImpl; | 70 class SessionRestoreImpl; |
| 71 class TabLoader; | 71 class TabLoader; |
| 72 | 72 |
| (...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 void ShowBrowser(Browser* browser, int selected_tab_index) { | 1080 void ShowBrowser(Browser* browser, int selected_tab_index) { |
| 1081 DCHECK(browser); | 1081 DCHECK(browser); |
| 1082 DCHECK(browser->tab_strip_model()->count()); | 1082 DCHECK(browser->tab_strip_model()->count()); |
| 1083 browser->tab_strip_model()->ActivateTabAt(selected_tab_index, true); | 1083 browser->tab_strip_model()->ActivateTabAt(selected_tab_index, true); |
| 1084 | 1084 |
| 1085 if (browser_ == browser) | 1085 if (browser_ == browser) |
| 1086 return; | 1086 return; |
| 1087 | 1087 |
| 1088 #if defined(USE_ASH) | 1088 #if defined(USE_ASH) |
| 1089 // Prevent the auto window management for this window on show. | 1089 // Prevent the auto window management for this window on show. |
| 1090 ash::wm::GetWindowSettings(browser->window()->GetNativeWindow())-> | 1090 ash::wm::GetWindowState(browser->window()->GetNativeWindow())-> |
| 1091 set_bounds_changed_by_user(true); | 1091 set_bounds_changed_by_user(true); |
| 1092 #endif | 1092 #endif |
| 1093 browser->window()->Show(); | 1093 browser->window()->Show(); |
| 1094 #if defined(USE_ASH) | 1094 #if defined(USE_ASH) |
| 1095 ash::wm::GetWindowSettings(browser->window()->GetNativeWindow())-> | 1095 ash::wm::GetWindowState(browser->window()->GetNativeWindow())-> |
| 1096 set_bounds_changed_by_user(false); | 1096 set_bounds_changed_by_user(false); |
| 1097 #endif | 1097 #endif |
| 1098 browser->set_is_session_restore(false); | 1098 browser->set_is_session_restore(false); |
| 1099 | 1099 |
| 1100 // TODO(jcampan): http://crbug.com/8123 we should not need to set the | 1100 // TODO(jcampan): http://crbug.com/8123 we should not need to set the |
| 1101 // initial focus explicitly. | 1101 // initial focus explicitly. |
| 1102 browser->tab_strip_model()->GetActiveWebContents()-> | 1102 browser->tab_strip_model()->GetActiveWebContents()-> |
| 1103 GetView()->SetInitialFocus(); | 1103 GetView()->SetInitialFocus(); |
| 1104 | 1104 |
| 1105 if (!browser_shown_) { | 1105 if (!browser_shown_) { |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1267 if (!active_session_restorers) | 1267 if (!active_session_restorers) |
| 1268 return false; | 1268 return false; |
| 1269 for (std::set<SessionRestoreImpl*>::const_iterator it = | 1269 for (std::set<SessionRestoreImpl*>::const_iterator it = |
| 1270 active_session_restorers->begin(); | 1270 active_session_restorers->begin(); |
| 1271 it != active_session_restorers->end(); ++it) { | 1271 it != active_session_restorers->end(); ++it) { |
| 1272 if ((*it)->synchronous()) | 1272 if ((*it)->synchronous()) |
| 1273 return true; | 1273 return true; |
| 1274 } | 1274 } |
| 1275 return false; | 1275 return false; |
| 1276 } | 1276 } |
| OLD | NEW |