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

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

Issue 10917026: Switch Extensions::TabHelper to use WebContents, WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 8 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 | 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/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/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/extensions/tab_helper.h" 10 #include "chrome/browser/extensions/tab_helper.h"
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 tab_contents->favicon_tab_helper()->GetFavicon().AsImageSkia(); 519 tab_contents->favicon_tab_helper()->GetFavicon().AsImageSkia();
520 data->network_state = TabContentsNetworkState(contents); 520 data->network_state = TabContentsNetworkState(contents);
521 data->title = contents->GetTitle(); 521 data->title = contents->GetTitle();
522 data->url = contents->GetURL(); 522 data->url = contents->GetURL();
523 data->loading = contents->IsLoading(); 523 data->loading = contents->IsLoading();
524 data->crashed_status = contents->GetCrashedStatus(); 524 data->crashed_status = contents->GetCrashedStatus();
525 data->incognito = contents->GetBrowserContext()->IsOffTheRecord(); 525 data->incognito = contents->GetBrowserContext()->IsOffTheRecord();
526 data->show_icon = tab_contents->favicon_tab_helper()->ShouldDisplayFavicon(); 526 data->show_icon = tab_contents->favicon_tab_helper()->ShouldDisplayFavicon();
527 data->mini = model_->IsMiniTab(model_index); 527 data->mini = model_->IsMiniTab(model_index);
528 data->blocked = model_->IsTabBlocked(model_index); 528 data->blocked = model_->IsTabBlocked(model_index);
529 data->app = tab_contents->extension_tab_helper()->is_app(); 529 data->app = extensions::TabHelper::FromWebContents(contents)->is_app();
530 data->mode = browser_->search_model()->mode().mode; 530 data->mode = browser_->search_model()->mode().mode;
531 // Get current gradient background animation to paint. 531 // Get current gradient background animation to paint.
532 data->gradient_background_opacity = browser_->search_delegate()-> 532 data->gradient_background_opacity = browser_->search_delegate()->
533 toolbar_search_animator().GetGradientOpacity(); 533 toolbar_search_animator().GetGradientOpacity();
534 } 534 }
535 535
536 void BrowserTabStripController::SetTabDataAt( 536 void BrowserTabStripController::SetTabDataAt(
537 TabContents* contents, 537 TabContents* contents,
538 int model_index) { 538 int model_index) {
539 TabRendererData data; 539 TabRendererData data;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 SetTabRendererDataFromModel(contents->web_contents(), index, &data, NEW_TAB); 579 SetTabRendererDataFromModel(contents->web_contents(), index, &data, NEW_TAB);
580 tabstrip_->AddTabAt(index, data, is_active); 580 tabstrip_->AddTabAt(index, data, is_active);
581 } 581 }
582 582
583 void BrowserTabStripController::UpdateLayoutType() { 583 void BrowserTabStripController::UpdateLayoutType() {
584 bool adjust_layout = false; 584 bool adjust_layout = false;
585 TabStripLayoutType layout_type = 585 TabStripLayoutType layout_type =
586 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout); 586 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout);
587 tabstrip_->SetLayoutType(layout_type, adjust_layout); 587 tabstrip_->SetLayoutType(layout_type, adjust_layout);
588 } 588 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/page_action_image_view.cc ('k') | chrome/browser/ui/web_applications/web_app_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698