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

Side by Side Diff: chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc

Issue 1260033003: Partially componentize //chrome/browser/search/search.{h,cc} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on iOS Created 5 years, 4 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/views/tabs/browser_tab_strip_controller.h" 5 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/task_runner_util.h" 9 #include "base/task_runner_util.h"
10 #include "base/threading/sequenced_worker_pool.h" 10 #include "base/threading/sequenced_worker_pool.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 bool BrowserTabStripController::IsTabPinned(int model_index) const { 262 bool BrowserTabStripController::IsTabPinned(int model_index) const {
263 return model_->ContainsIndex(model_index) && model_->IsTabPinned(model_index); 263 return model_->ContainsIndex(model_index) && model_->IsTabPinned(model_index);
264 } 264 }
265 265
266 bool BrowserTabStripController::IsNewTabPage(int model_index) const { 266 bool BrowserTabStripController::IsNewTabPage(int model_index) const {
267 if (!model_->ContainsIndex(model_index)) 267 if (!model_->ContainsIndex(model_index))
268 return false; 268 return false;
269 269
270 const WebContents* contents = model_->GetWebContentsAt(model_index); 270 const WebContents* contents = model_->GetWebContentsAt(model_index);
271 return contents && (contents->GetURL() == GURL(chrome::kChromeUINewTabURL) || 271 return contents && (contents->GetURL() == GURL(chrome::kChromeUINewTabURL) ||
272 chrome::IsInstantNTP(contents)); 272 search::IsInstantNTP(contents));
273 } 273 }
274 274
275 void BrowserTabStripController::SelectTab(int model_index) { 275 void BrowserTabStripController::SelectTab(int model_index) {
276 model_->ActivateTabAt(model_index, true); 276 model_->ActivateTabAt(model_index, true);
277 } 277 }
278 278
279 void BrowserTabStripController::ExtendSelectionTo(int model_index) { 279 void BrowserTabStripController::ExtendSelectionTo(int model_index) {
280 model_->ExtendSelectionTo(model_index); 280 model_->ExtendSelectionTo(model_index);
281 } 281 }
282 282
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 content::WebPluginInfo plugin; 577 content::WebPluginInfo plugin;
578 tabstrip_->FileSupported( 578 tabstrip_->FileSupported(
579 url, 579 url,
580 mime_type.empty() || mime_util::IsSupportedMimeType(mime_type) || 580 mime_type.empty() || mime_util::IsSupportedMimeType(mime_type) ||
581 content::PluginService::GetInstance()->GetPluginInfo( 581 content::PluginService::GetInstance()->GetPluginInfo(
582 -1, // process ID 582 -1, // process ID
583 MSG_ROUTING_NONE, // routing ID 583 MSG_ROUTING_NONE, // routing ID
584 model_->profile()->GetResourceContext(), url, GURL(), mime_type, 584 model_->profile()->GetResourceContext(), url, GURL(), mime_type,
585 false, NULL, &plugin, NULL)); 585 false, NULL, &plugin, NULL));
586 } 586 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | chrome/browser/ui/webui/history_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698