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

Side by Side Diff: chrome/browser/ui/singleton_tabs.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) 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/singleton_tabs.h" 5 #include "chrome/browser/ui/singleton_tabs.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/search/search.h" 8 #include "chrome/browser/search/search.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_navigator.h" 10 #include "chrome/browser/ui/browser_navigator.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 GetIndexOfSingletonTab(&local_params) < 0) { 54 GetIndexOfSingletonTab(&local_params) < 0) {
55 local_params.disposition = CURRENT_TAB; 55 local_params.disposition = CURRENT_TAB;
56 } 56 }
57 } 57 }
58 58
59 Navigate(&local_params); 59 Navigate(&local_params);
60 } 60 }
61 61
62 NavigateParams GetSingletonTabNavigateParams(Browser* browser, 62 NavigateParams GetSingletonTabNavigateParams(Browser* browser,
63 const GURL& url) { 63 const GURL& url) {
64 NavigateParams params(browser, url, content::PAGE_TRANSITION_AUTO_BOOKMARK); 64 NavigateParams params(browser, url, ui::PAGE_TRANSITION_AUTO_BOOKMARK);
65 params.disposition = SINGLETON_TAB; 65 params.disposition = SINGLETON_TAB;
66 params.window_action = NavigateParams::SHOW_WINDOW; 66 params.window_action = NavigateParams::SHOW_WINDOW;
67 params.user_gesture = true; 67 params.user_gesture = true;
68 params.tabstrip_add_types |= TabStripModel::ADD_INHERIT_OPENER; 68 params.tabstrip_add_types |= TabStripModel::ADD_INHERIT_OPENER;
69 return params; 69 return params;
70 } 70 }
71 71
72 // Returns the index of an existing singleton tab in |params->browser| matching 72 // Returns the index of an existing singleton tab in |params->browser| matching
73 // the URL specified in |params|. 73 // the URL specified in |params|.
74 int GetIndexOfSingletonTab(NavigateParams* params) { 74 int GetIndexOfSingletonTab(NavigateParams* params) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 replacements)) { 122 replacements)) {
123 params->target_contents = tab; 123 params->target_contents = tab;
124 return tab_index; 124 return tab_index;
125 } 125 }
126 } 126 }
127 127
128 return -1; 128 return -1;
129 } 129 }
130 130
131 } // namespace chrome 131 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/settings_window_manager.cc ('k') | chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698