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

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

Issue 12319058: Revert 183977 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Deleted: svn:mergeinfo
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 "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 data->show_icon = favicon_tab_helper->ShouldDisplayFavicon(); 448 data->show_icon = favicon_tab_helper->ShouldDisplayFavicon();
449 data->mini = model_->IsMiniTab(model_index); 449 data->mini = model_->IsMiniTab(model_index);
450 data->blocked = model_->IsTabBlocked(model_index); 450 data->blocked = model_->IsTabBlocked(model_index);
451 data->app = extensions::TabHelper::FromWebContents(contents)->is_app(); 451 data->app = extensions::TabHelper::FromWebContents(contents)->is_app();
452 if (chrome::ShouldShowProjectingIndicator(contents)) 452 if (chrome::ShouldShowProjectingIndicator(contents))
453 data->capture_state = TabRendererData::CAPTURE_STATE_PROJECTING; 453 data->capture_state = TabRendererData::CAPTURE_STATE_PROJECTING;
454 else if (chrome::ShouldShowRecordingIndicator(contents)) 454 else if (chrome::ShouldShowRecordingIndicator(contents))
455 data->capture_state = TabRendererData::CAPTURE_STATE_RECORDING; 455 data->capture_state = TabRendererData::CAPTURE_STATE_RECORDING;
456 else 456 else
457 data->capture_state = TabRendererData::CAPTURE_STATE_NONE; 457 data->capture_state = TabRendererData::CAPTURE_STATE_NONE;
458
459 if (chrome::ShouldShowAudioIndicator(contents))
460 data->audio_state = TabRendererData::AUDIO_STATE_PLAYING;
461 else
462 data->audio_state = TabRendererData::AUDIO_STATE_NONE;
463 } 458 }
464 459
465 void BrowserTabStripController::SetTabDataAt(content::WebContents* web_contents, 460 void BrowserTabStripController::SetTabDataAt(content::WebContents* web_contents,
466 int model_index) { 461 int model_index) {
467 TabRendererData data; 462 TabRendererData data;
468 SetTabRendererDataFromModel(web_contents, model_index, &data, EXISTING_TAB); 463 SetTabRendererDataFromModel(web_contents, model_index, &data, EXISTING_TAB);
469 tabstrip_->SetTabData(model_index, data); 464 tabstrip_->SetTabData(model_index, data);
470 } 465 }
471 466
472 void BrowserTabStripController::StartHighlightTabsForCommand( 467 void BrowserTabStripController::StartHighlightTabsForCommand(
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 SetTabRendererDataFromModel(contents, index, &data, NEW_TAB); 501 SetTabRendererDataFromModel(contents, index, &data, NEW_TAB);
507 tabstrip_->AddTabAt(index, data, is_active); 502 tabstrip_->AddTabAt(index, data, is_active);
508 } 503 }
509 504
510 void BrowserTabStripController::UpdateLayoutType() { 505 void BrowserTabStripController::UpdateLayoutType() {
511 bool adjust_layout = false; 506 bool adjust_layout = false;
512 TabStripLayoutType layout_type = 507 TabStripLayoutType layout_type =
513 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout); 508 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout);
514 tabstrip_->SetLayoutType(layout_type, adjust_layout); 509 tabstrip_->SetLayoutType(layout_type, adjust_layout);
515 } 510 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698