| 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 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 return gfx::Rect(0, 0, 800, 600); | 939 return gfx::Rect(0, 0, 800, 600); |
| 940 } | 940 } |
| 941 | 941 |
| 942 gfx::Rect restored_bounds = override_bounds_; | 942 gfx::Rect restored_bounds = override_bounds_; |
| 943 WindowSizer::GetBrowserWindowBounds(app_name_, restored_bounds, this, | 943 WindowSizer::GetBrowserWindowBounds(app_name_, restored_bounds, this, |
| 944 &restored_bounds); | 944 &restored_bounds); |
| 945 return restored_bounds; | 945 return restored_bounds; |
| 946 } | 946 } |
| 947 | 947 |
| 948 ui::WindowShowState Browser::GetSavedWindowShowState() const { | 948 ui::WindowShowState Browser::GetSavedWindowShowState() const { |
| 949 // Only tabbed browsers use the command line or preference state. |
| 950 if (!is_type_tabbed()) { |
| 951 return (show_state_ == ui::SHOW_STATE_DEFAULT) |
| 952 ? ui::SHOW_STATE_NORMAL : show_state_; |
| 953 } |
| 954 |
| 949 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kStartMaximized)) | 955 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kStartMaximized)) |
| 950 return ui::SHOW_STATE_MAXIMIZED; | 956 return ui::SHOW_STATE_MAXIMIZED; |
| 951 | 957 |
| 952 if (show_state_ != ui::SHOW_STATE_DEFAULT) | 958 if (show_state_ != ui::SHOW_STATE_DEFAULT) |
| 953 return show_state_; | 959 return show_state_; |
| 954 | 960 |
| 955 const DictionaryValue* window_pref = | 961 const DictionaryValue* window_pref = |
| 956 profile()->GetPrefs()->GetDictionary(GetWindowPlacementKey().c_str()); | 962 profile()->GetPrefs()->GetDictionary(GetWindowPlacementKey().c_str()); |
| 957 bool maximized = false; | 963 bool maximized = false; |
| 958 window_pref->GetBoolean("maximized", &maximized); | 964 window_pref->GetBoolean("maximized", &maximized); |
| (...skipping 4510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5469 local_state->SetBoolean(prefs::kShouldShowFirstRunBubble, false); | 5475 local_state->SetBoolean(prefs::kShouldShowFirstRunBubble, false); |
| 5470 window_->GetLocationBar()->ShowFirstRunBubble(); | 5476 window_->GetLocationBar()->ShowFirstRunBubble(); |
| 5471 } else { | 5477 } else { |
| 5472 GlobalErrorService* service = | 5478 GlobalErrorService* service = |
| 5473 GlobalErrorServiceFactory::GetForProfile(profile()); | 5479 GlobalErrorServiceFactory::GetForProfile(profile()); |
| 5474 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5480 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
| 5475 if (error) | 5481 if (error) |
| 5476 error->ShowBubbleView(this); | 5482 error->ShowBubbleView(this); |
| 5477 } | 5483 } |
| 5478 } | 5484 } |
| OLD | NEW |