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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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
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 28 matching lines...) Expand all
39 Browser* browser = FindBrowserForProfile(profile); 39 Browser* browser = FindBrowserForProfile(profile);
40 if (browser) { 40 if (browser) {
41 DCHECK(browser->profile() == profile); 41 DCHECK(browser->profile() == profile);
42 const content::WebContents* web_contents = 42 const content::WebContents* web_contents =
43 browser->tab_strip_model()->GetWebContentsAt(0); 43 browser->tab_strip_model()->GetWebContentsAt(0);
44 if (web_contents && web_contents->GetURL() == gurl) { 44 if (web_contents && web_contents->GetURL() == gurl) {
45 browser->window()->Show(); 45 browser->window()->Show();
46 return; 46 return;
47 } 47 }
48 NavigateParams params(browser, gurl, 48 NavigateParams params(browser, gurl,
49 content::PAGE_TRANSITION_AUTO_BOOKMARK); 49 ui::PAGE_TRANSITION_AUTO_BOOKMARK);
50 params.window_action = NavigateParams::SHOW_WINDOW; 50 params.window_action = NavigateParams::SHOW_WINDOW;
51 params.user_gesture = true; 51 params.user_gesture = true;
52 chrome::Navigate(&params); 52 chrome::Navigate(&params);
53 return; 53 return;
54 } 54 }
55 55
56 // No existing browser window, create one. 56 // No existing browser window, create one.
57 NavigateParams params(profile, gurl, content::PAGE_TRANSITION_AUTO_BOOKMARK); 57 NavigateParams params(profile, gurl, ui::PAGE_TRANSITION_AUTO_BOOKMARK);
58 params.disposition = NEW_POPUP; 58 params.disposition = NEW_POPUP;
59 params.trusted_source = true; 59 params.trusted_source = true;
60 params.window_action = NavigateParams::SHOW_WINDOW; 60 params.window_action = NavigateParams::SHOW_WINDOW;
61 params.user_gesture = true; 61 params.user_gesture = true;
62 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; 62 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE;
63 chrome::Navigate(&params); 63 chrome::Navigate(&params);
64 settings_session_map_[profile] = params.browser->session_id().id(); 64 settings_session_map_[profile] = params.browser->session_id().id();
65 65
66 FOR_EACH_OBSERVER(SettingsWindowManagerObserver, 66 FOR_EACH_OBSERVER(SettingsWindowManagerObserver,
67 observers_, OnNewSettingsWindow(params.browser)); 67 observers_, OnNewSettingsWindow(params.browser));
(...skipping 13 matching lines...) Expand all
81 iter->second == browser->session_id().id()); 81 iter->second == browser->session_id().id());
82 } 82 }
83 83
84 SettingsWindowManager::SettingsWindowManager() { 84 SettingsWindowManager::SettingsWindowManager() {
85 } 85 }
86 86
87 SettingsWindowManager::~SettingsWindowManager() { 87 SettingsWindowManager::~SettingsWindowManager() {
88 } 88 }
89 89
90 } // namespace chrome 90 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/search_engines/search_engine_tab_helper.cc ('k') | chrome/browser/ui/singleton_tabs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698