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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 10949023: Add switch to provide app window size on startup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove hack Created 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/extensions/application_launch.h » ('j') | 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) 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/chromeos/login/existing_user_controller.h" 5 #include "chrome/browser/chromeos/login/existing_user_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const char kSettingsSyncLoginURL[] = "chrome://settings/personal"; 67 const char kSettingsSyncLoginURL[] = "chrome://settings/personal";
68 68
69 // Major version where we still show GSG as "Release Notes" after the update. 69 // Major version where we still show GSG as "Release Notes" after the update.
70 const long int kReleaseNotesTargetRelease = 19; 70 const long int kReleaseNotesTargetRelease = 19;
71 71
72 // Getting started guide URL, will be opened as in app window for each new 72 // Getting started guide URL, will be opened as in app window for each new
73 // user who logs on the device. 73 // user who logs on the device.
74 const char kGetStartedURLPattern[] = 74 const char kGetStartedURLPattern[] =
75 "http://gweb-gettingstartedguide.appspot.com/"; 75 "http://gweb-gettingstartedguide.appspot.com/";
76 76
77 // Getting started guide application window size.
78 const char kGSGAppWindowSize[] = "820,550";
79
77 // Parameter to be added to GetStarted URL that contains board. 80 // Parameter to be added to GetStarted URL that contains board.
78 const char kGetStartedBoardParam[] = "board"; 81 const char kGetStartedBoardParam[] = "board";
79 82
80 // Parameter to be added to GetStarted URL 83 // Parameter to be added to GetStarted URL
81 // when first user signs in for the first time (OOBE case). 84 // when first user signs in for the first time (OOBE case).
82 const char kGetStartedOwnerParam[] = "owner"; 85 const char kGetStartedOwnerParam[] = "owner";
83 const char kGetStartedOwnerParamValue[] = "true"; 86 const char kGetStartedOwnerParamValue[] = "true";
84 const char kGetStartedInitialLocaleParam[] = "initial_locale"; 87 const char kGetStartedInitialLocaleParam[] = "initial_locale";
85 88
86 // URL for account creation. 89 // URL for account creation.
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 ServicesCustomizationDocument::GetInstance(); 806 ServicesCustomizationDocument::GetInstance();
804 if (!ServicesCustomizationDocument::WasApplied() && 807 if (!ServicesCustomizationDocument::WasApplied() &&
805 customization->IsReady()) { 808 customization->IsReady()) {
806 // Since we don't use OEM start URL anymore, just mark as applied. 809 // Since we don't use OEM start URL anymore, just mark as applied.
807 customization->ApplyCustomization(); 810 customization->ApplyCustomization();
808 } 811 }
809 812
810 if (!guide_url.empty()) { 813 if (!guide_url.empty()) {
811 CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kApp, 814 CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kApp,
812 guide_url); 815 guide_url);
813 // NTP would open in the background, app window with GSG would be focused 816 CommandLine::ForCurrentProcess()->AppendSwitchASCII(
814 // so that user won't have an empty desktop after GSG is closed. 817 switches::kAppWindowSize, kGSGAppWindowSize);
815 CommandLine::ForCurrentProcess()->AppendArg(chrome::kChromeUINewTabURL);
816 } else { 818 } else {
817 // We should not be adding any start URLs if guide 819 // We should not be adding any start URLs if guide
818 // is defined as it launches as a standalone app window. 820 // is defined as it launches as a standalone app window.
819 for (size_t i = 0; i < start_urls.size(); ++i) 821 for (size_t i = 0; i < start_urls.size(); ++i)
820 CommandLine::ForCurrentProcess()->AppendArg(start_urls[i]); 822 CommandLine::ForCurrentProcess()->AppendArg(start_urls[i]);
821 } 823 }
822 } 824 }
823 825
824 std::string ExistingUserController::GetGettingStartedGuideURL() const { 826 std::string ExistingUserController::GetGettingStartedGuideURL() const {
825 GURL guide_url(kGetStartedURLPattern); 827 GURL guide_url(kGetStartedURLPattern);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 // Invalidate OAuth token, since it can't be correct after password is 933 // Invalidate OAuth token, since it can't be correct after password is
932 // changed. 934 // changed.
933 UserManager::Get()->SaveUserOAuthStatus(username, 935 UserManager::Get()->SaveUserOAuthStatus(username,
934 User::OAUTH_TOKEN_STATUS_INVALID); 936 User::OAUTH_TOKEN_STATUS_INVALID);
935 937
936 login_display_->SetUIEnabled(true); 938 login_display_->SetUIEnabled(true);
937 login_display_->ShowGaiaPasswordChanged(username); 939 login_display_->ShowGaiaPasswordChanged(username);
938 } 940 }
939 941
940 } // namespace chromeos 942 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/extensions/application_launch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698