| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |