Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: chrome/browser/sessions/session_restore.cc

Issue 24108003: [Cleanup] Rename WindowSettings to WindowState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase fix Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/app_window/app_window_api.cc ('k') | chrome/browser/ui/ash/chrome_shell_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698