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

Side by Side Diff: chrome/browser/ui/settings_window_manager.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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/settings_window_manager.h" 5 #include "chrome/browser/ui/settings_window_manager.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/browser_finder.h" 8 #include "chrome/browser/ui/browser_finder.h"
9 #include "chrome/browser/ui/browser_finder.h" 9 #include "chrome/browser/ui/browser_finder.h"
10 #include "chrome/browser/ui/browser_navigator.h" 10 #include "chrome/browser/ui/browser_navigator.h"
(...skipping 29 matching lines...) Expand all
40 if (!profile->IsGuestSession() && profile->IsOffTheRecord()) 40 if (!profile->IsGuestSession() && profile->IsOffTheRecord())
41 profile = profile->GetOriginalProfile(); 41 profile = profile->GetOriginalProfile();
42 42
43 // Look for an existing browser window. 43 // Look for an existing browser window.
44 Browser* browser = FindBrowserForProfile(profile); 44 Browser* browser = FindBrowserForProfile(profile);
45 if (browser) { 45 if (browser) {
46 DCHECK(browser->profile() == profile); 46 DCHECK(browser->profile() == profile);
47 const content::WebContents* web_contents = 47 const content::WebContents* web_contents =
48 browser->tab_strip_model()->GetWebContentsAt(0); 48 browser->tab_strip_model()->GetWebContentsAt(0);
49 if (web_contents && web_contents->GetURL() == gurl) { 49 if (web_contents && web_contents->GetURL() == gurl) {
50 browser->window()->Show(); 50 browser->window()->Show(true /* user_gesture */);
51 return; 51 return;
52 } 52 }
53 NavigateParams params(browser, gurl, 53 NavigateParams params(browser, gurl,
54 ui::PAGE_TRANSITION_AUTO_BOOKMARK); 54 ui::PAGE_TRANSITION_AUTO_BOOKMARK);
55 params.window_action = NavigateParams::SHOW_WINDOW; 55 params.window_action = NavigateParams::SHOW_WINDOW;
56 params.user_gesture = true; 56 params.user_gesture = true;
57 chrome::Navigate(&params); 57 chrome::Navigate(&params);
58 return; 58 return;
59 } 59 }
60 60
(...skipping 26 matching lines...) Expand all
87 iter->second == browser->session_id().id()); 87 iter->second == browser->session_id().id());
88 } 88 }
89 89
90 SettingsWindowManager::SettingsWindowManager() { 90 SettingsWindowManager::SettingsWindowManager() {
91 } 91 }
92 92
93 SettingsWindowManager::~SettingsWindowManager() { 93 SettingsWindowManager::~SettingsWindowManager() {
94 } 94 }
95 95
96 } // namespace chrome 96 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/scoped_tabbed_browser_displayer.cc ('k') | chrome/browser/ui/startup/startup_browser_creator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698