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

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

Issue 1158523002: Add user_gesture param to BaseWindow::Show Base URL: https://chromium.googlesource.com/chromium/src.git@ug3_BaseWindow_Activate
Patch Set: Update callers Created 5 years, 7 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
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/ui/startup/startup_browser_creator_impl.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "apps/app_restore_service.h" 10 #include "apps/app_restore_service.h"
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 chrome::AddTabAt(browser, GURL(), -1, true); 804 chrome::AddTabAt(browser, GURL(), -1, true);
805 else 805 else
806 browser->tab_strip_model()->ActivateTabAt(0, false); 806 browser->tab_strip_model()->ActivateTabAt(0, false);
807 } 807 }
808 808
809 // The default behavior is to show the window, as expressed by the default 809 // The default behavior is to show the window, as expressed by the default
810 // value of StartupBrowserCreated::show_main_browser_window_. If this was set 810 // value of StartupBrowserCreated::show_main_browser_window_. If this was set
811 // to true ahead of this place, it means another task must have been spawned 811 // to true ahead of this place, it means another task must have been spawned
812 // to take care of that. 812 // to take care of that.
813 if (!browser_creator_ || browser_creator_->show_main_browser_window()) 813 if (!browser_creator_ || browser_creator_->show_main_browser_window())
814 browser->window()->Show(); 814 browser->window()->Show(true /* user_gesture */);
815 815
816 return browser; 816 return browser;
817 } 817 }
818 818
819 void StartupBrowserCreatorImpl::AddInfoBarsIfNecessary( 819 void StartupBrowserCreatorImpl::AddInfoBarsIfNecessary(
820 Browser* browser, 820 Browser* browser,
821 chrome::startup::IsProcessStartup is_process_startup) { 821 chrome::startup::IsProcessStartup is_process_startup) {
822 if (!browser || !profile_ || browser->tab_strip_model()->count() == 0) 822 if (!browser || !profile_ || browser->tab_strip_model()->count() == 0)
823 return; 823 return;
824 824
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 // behavior is desired because completing or skipping the sync promo 911 // behavior is desired because completing or skipping the sync promo
912 // causes a redirect to the NTP. 912 // causes a redirect to the NTP.
913 if (!startup_urls->empty() && 913 if (!startup_urls->empty() &&
914 startup_urls->at(0) == GURL(chrome::kChromeUINewTabURL)) 914 startup_urls->at(0) == GURL(chrome::kChromeUINewTabURL))
915 startup_urls->at(0) = sync_promo_url; 915 startup_urls->at(0) = sync_promo_url;
916 else 916 else
917 startup_urls->insert(startup_urls->begin(), sync_promo_url); 917 startup_urls->insert(startup_urls->begin(), sync_promo_url);
918 } 918 }
919 } 919 }
920 } 920 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/settings_window_manager.cc ('k') | chrome/browser/ui/sync/one_click_signin_sync_starter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698