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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 9270017: Merge 118174 - Don't use command line or prefs for popup saved state (Closed) Base URL: svn://svn.chromium.org/chrome/branches/963/src/
Patch Set: Created 8 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 return gfx::Rect(0, 0, 800, 600); 926 return gfx::Rect(0, 0, 800, 600);
927 } 927 }
928 928
929 gfx::Rect restored_bounds = override_bounds_; 929 gfx::Rect restored_bounds = override_bounds_;
930 WindowSizer::GetBrowserWindowBounds(app_name_, restored_bounds, this, 930 WindowSizer::GetBrowserWindowBounds(app_name_, restored_bounds, this,
931 &restored_bounds); 931 &restored_bounds);
932 return restored_bounds; 932 return restored_bounds;
933 } 933 }
934 934
935 ui::WindowShowState Browser::GetSavedWindowShowState() const { 935 ui::WindowShowState Browser::GetSavedWindowShowState() const {
936 // Only tabbed browsers use the command line or preference state.
937 if (!is_type_tabbed()) {
938 return (show_state_ == ui::SHOW_STATE_DEFAULT)
939 ? ui::SHOW_STATE_NORMAL : show_state_;
940 }
941
936 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kStartMaximized)) 942 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kStartMaximized))
937 return ui::SHOW_STATE_MAXIMIZED; 943 return ui::SHOW_STATE_MAXIMIZED;
938 944
939 if (show_state_ != ui::SHOW_STATE_DEFAULT) 945 if (show_state_ != ui::SHOW_STATE_DEFAULT)
940 return show_state_; 946 return show_state_;
941 947
942 const DictionaryValue* window_pref = 948 const DictionaryValue* window_pref =
943 profile()->GetPrefs()->GetDictionary(GetWindowPlacementKey().c_str()); 949 profile()->GetPrefs()->GetDictionary(GetWindowPlacementKey().c_str());
944 bool maximized = false; 950 bool maximized = false;
945 window_pref->GetBoolean("maximized", &maximized); 951 window_pref->GetBoolean("maximized", &maximized);
(...skipping 4382 matching lines...) Expand 10 before | Expand all | Expand 10 after
5328 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); 5334 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type);
5329 } else { 5335 } else {
5330 GlobalErrorService* service = 5336 GlobalErrorService* service =
5331 GlobalErrorServiceFactory::GetForProfile(profile()); 5337 GlobalErrorServiceFactory::GetForProfile(profile());
5332 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); 5338 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView();
5333 if (error) { 5339 if (error) {
5334 error->ShowBubbleView(this); 5340 error->ShowBubbleView(this);
5335 } 5341 }
5336 } 5342 }
5337 } 5343 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698