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

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

Issue 1064823002: Componentize FaviconTabHelper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@favicon-notification
Patch Set: Fix BUILD.gn Created 5 years, 8 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
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm ('k') | components/favicon.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 FaviconTabHelper::FromWebContents(contents); 502 FaviconTabHelper::FromWebContents(contents);
503 503
504 data->favicon = favicon_tab_helper->GetFavicon().AsImageSkia(); 504 data->favicon = favicon_tab_helper->GetFavicon().AsImageSkia();
505 data->network_state = TabContentsNetworkState(contents); 505 data->network_state = TabContentsNetworkState(contents);
506 data->title = contents->GetTitle(); 506 data->title = contents->GetTitle();
507 data->url = contents->GetURL(); 507 data->url = contents->GetURL();
508 data->loading = contents->IsLoading(); 508 data->loading = contents->IsLoading();
509 data->crashed_status = contents->GetCrashedStatus(); 509 data->crashed_status = contents->GetCrashedStatus();
510 data->incognito = contents->GetBrowserContext()->IsOffTheRecord(); 510 data->incognito = contents->GetBrowserContext()->IsOffTheRecord();
511 data->mini = model_->IsMiniTab(model_index); 511 data->mini = model_->IsMiniTab(model_index);
512 data->show_icon = data->mini || favicon_tab_helper->ShouldDisplayFavicon(); 512 data->show_icon =
513 data->mini || FaviconTabHelper::ShouldDisplayFavicon(contents);
513 data->blocked = model_->IsTabBlocked(model_index); 514 data->blocked = model_->IsTabBlocked(model_index);
514 data->app = extensions::TabHelper::FromWebContents(contents)->is_app(); 515 data->app = extensions::TabHelper::FromWebContents(contents)->is_app();
515 data->media_state = chrome::GetTabMediaStateForContents(contents); 516 data->media_state = chrome::GetTabMediaStateForContents(contents);
516 } 517 }
517 518
518 void BrowserTabStripController::SetTabDataAt(content::WebContents* web_contents, 519 void BrowserTabStripController::SetTabDataAt(content::WebContents* web_contents,
519 int model_index) { 520 int model_index) {
520 TabRendererData data; 521 TabRendererData data;
521 SetTabRendererDataFromModel(web_contents, model_index, &data, EXISTING_TAB); 522 SetTabRendererDataFromModel(web_contents, model_index, &data, EXISTING_TAB);
522 tabstrip_->SetTabData(model_index, data); 523 tabstrip_->SetTabData(model_index, data);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 url, 583 url,
583 mime_type.empty() || 584 mime_type.empty() ||
584 net::IsSupportedMimeType(mime_type) || 585 net::IsSupportedMimeType(mime_type) ||
585 content::PluginService::GetInstance()->GetPluginInfo( 586 content::PluginService::GetInstance()->GetPluginInfo(
586 -1, // process ID 587 -1, // process ID
587 MSG_ROUTING_NONE, // routing ID 588 MSG_ROUTING_NONE, // routing ID
588 model_->profile()->GetResourceContext(), 589 model_->profile()->GetResourceContext(),
589 url, GURL(), mime_type, false, 590 url, GURL(), mime_type, false,
590 NULL, &plugin, NULL)); 591 NULL, &plugin, NULL));
591 } 592 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm ('k') | components/favicon.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698