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

Side by Side Diff: chrome/browser/ui/search/other_device_menu_controller.cc

Issue 11896047: Move the methods in disposition_utils.h and event_disposition.h to ui\base\window_open_disposition.… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix regex in ui.gyp Created 7 years, 11 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
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/search/other_device_menu_controller.h" 5 #include "chrome/browser/ui/search/other_device_menu_controller.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "chrome/browser/sync/glue/session_model_associator.h" 9 #include "chrome/browser/sync/glue/session_model_associator.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // This is not a mistake - sessionId actually refers to the tab id. 130 // This is not a mistake - sessionId actually refers to the tab id.
131 // See http://crbug.com/154865. 131 // See http://crbug.com/154865.
132 int tab_id = browser_sync::ForeignSessionHandler::kInvalidId; 132 int tab_id = browser_sync::ForeignSessionHandler::kInvalidId;
133 tab_data->GetInteger("sessionId", &tab_id); 133 tab_data->GetInteger("sessionId", &tab_id);
134 134
135 int window_id = browser_sync::ForeignSessionHandler::kInvalidId; 135 int window_id = browser_sync::ForeignSessionHandler::kInvalidId;
136 tab_data->GetInteger("windowId", &window_id); 136 tab_data->GetInteger("windowId", &window_id);
137 137
138 if (tab_id != browser_sync::ForeignSessionHandler::kInvalidId) { 138 if (tab_id != browser_sync::ForeignSessionHandler::kInvalidId) {
139 WindowOpenDisposition disposition = 139 WindowOpenDisposition disposition =
140 chrome::DispositionFromEventFlags(event_flags); 140 ui::DispositionFromEventFlags(event_flags);
141 browser_sync::ForeignSessionHandler::OpenForeignSessionTab( 141 browser_sync::ForeignSessionHandler::OpenForeignSessionTab(
142 web_ui_, session_id_, window_id, tab_id, disposition); 142 web_ui_, session_id_, window_id, tab_id, disposition);
143 } else { 143 } else {
144 browser_sync::ForeignSessionHandler::OpenForeignSessionWindows( 144 browser_sync::ForeignSessionHandler::OpenForeignSessionWindows(
145 web_ui_, session_id_, window_id); 145 web_ui_, session_id_, window_id);
146 } 146 }
147 ItemType itemType = tab_id == 147 ItemType itemType = tab_id ==
148 browser_sync::ForeignSessionHandler::kInvalidId ? OPEN_ALL : TAB; 148 browser_sync::ForeignSessionHandler::kInvalidId ? OPEN_ALL : TAB;
149 UMA_HISTOGRAM_ENUMERATION("NewTabPage.OtherDeviceMenu", 149 UMA_HISTOGRAM_ENUMERATION("NewTabPage.OtherDeviceMenu",
150 itemType, ITEM_TYPE_ENUM_COUNT); 150 itemType, ITEM_TYPE_ENUM_COUNT);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 if (tab_data_.size() >= kMaxTabsToShow) 193 if (tab_data_.size() >= kMaxTabsToShow)
194 return; 194 return;
195 } 195 }
196 } 196 }
197 } 197 }
198 } 198 }
199 199
200 // OtherDevice menu ---------------------------------------------------------- 200 // OtherDevice menu ----------------------------------------------------------
201 201
202 OtherDeviceMenu::~OtherDeviceMenu() {} 202 OtherDeviceMenu::~OtherDeviceMenu() {}
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/event_utils.cc ('k') | chrome/browser/ui/toolbar/back_forward_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698