| 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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 data->url = contents->GetURL(); | 533 data->url = contents->GetURL(); |
| 534 data->loading = contents->IsLoading(); | 534 data->loading = contents->IsLoading(); |
| 535 data->crashed_status = contents->GetCrashedStatus(); | 535 data->crashed_status = contents->GetCrashedStatus(); |
| 536 data->incognito = contents->GetBrowserContext()->IsOffTheRecord(); | 536 data->incognito = contents->GetBrowserContext()->IsOffTheRecord(); |
| 537 data->show_icon = favicon_tab_helper->ShouldDisplayFavicon(); | 537 data->show_icon = favicon_tab_helper->ShouldDisplayFavicon(); |
| 538 data->mini = model_->IsMiniTab(model_index); | 538 data->mini = model_->IsMiniTab(model_index); |
| 539 data->blocked = model_->IsTabBlocked(model_index); | 539 data->blocked = model_->IsTabBlocked(model_index); |
| 540 data->app = extensions::TabHelper::FromWebContents(contents)->is_app(); | 540 data->app = extensions::TabHelper::FromWebContents(contents)->is_app(); |
| 541 int render_process_id = contents->GetRenderProcessHost()->GetID(); | 541 int render_process_id = contents->GetRenderProcessHost()->GetID(); |
| 542 int render_view_id = contents->GetRenderViewHost()->GetRoutingID(); | 542 int render_view_id = contents->GetRenderViewHost()->GetRoutingID(); |
| 543 scoped_refptr<MediaStreamCaptureIndicator> capture_indicator = |
| 544 MediaInternals::GetInstance()->GetMediaStreamCaptureIndicator(); |
| 543 data->recording = | 545 data->recording = |
| 544 MediaInternals::GetInstance()->media_stream_capture_indicator()-> | 546 capture_indicator->IsProcessCapturing(render_process_id, render_view_id); |
| 545 IsProcessCapturing(render_process_id, render_view_id); | |
| 546 data->mode = browser_->search_model()->mode().mode; | 547 data->mode = browser_->search_model()->mode().mode; |
| 547 // Get current gradient background animation to paint. | 548 // Get current gradient background animation to paint. |
| 548 data->gradient_background_opacity = browser_->search_delegate()-> | 549 data->gradient_background_opacity = browser_->search_delegate()-> |
| 549 toolbar_search_animator().GetGradientOpacity(); | 550 toolbar_search_animator().GetGradientOpacity(); |
| 550 } | 551 } |
| 551 | 552 |
| 552 void BrowserTabStripController::SetTabDataAt(content::WebContents* web_contents, | 553 void BrowserTabStripController::SetTabDataAt(content::WebContents* web_contents, |
| 553 int model_index) { | 554 int model_index) { |
| 554 TabRendererData data; | 555 TabRendererData data; |
| 555 SetTabRendererDataFromModel(web_contents, model_index, &data, EXISTING_TAB); | 556 SetTabRendererDataFromModel(web_contents, model_index, &data, EXISTING_TAB); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 SetTabRendererDataFromModel(contents->web_contents(), index, &data, NEW_TAB); | 594 SetTabRendererDataFromModel(contents->web_contents(), index, &data, NEW_TAB); |
| 594 tabstrip_->AddTabAt(index, data, is_active); | 595 tabstrip_->AddTabAt(index, data, is_active); |
| 595 } | 596 } |
| 596 | 597 |
| 597 void BrowserTabStripController::UpdateLayoutType() { | 598 void BrowserTabStripController::UpdateLayoutType() { |
| 598 bool adjust_layout = false; | 599 bool adjust_layout = false; |
| 599 TabStripLayoutType layout_type = | 600 TabStripLayoutType layout_type = |
| 600 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout); | 601 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout); |
| 601 tabstrip_->SetLayoutType(layout_type, adjust_layout); | 602 tabstrip_->SetLayoutType(layout_type, adjust_layout); |
| 602 } | 603 } |
| OLD | NEW |