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

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

Issue 2335203003: Add metrics to keep track of the tab activate/deactivate cycle (Closed)
Patch Set: Addressed comments Created 4 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
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/macros.h" 8 #include "base/macros.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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 } 426 }
427 427
428 SkColor BrowserTabStripController::GetToolbarTopSeparatorColor() const { 428 SkColor BrowserTabStripController::GetToolbarTopSeparatorColor() const {
429 return BrowserView::GetBrowserViewForBrowser(browser_)->frame() 429 return BrowserView::GetBrowserViewForBrowser(browser_)->frame()
430 ->GetFrameView()->GetToolbarTopSeparatorColor(); 430 ->GetFrameView()->GetToolbarTopSeparatorColor();
431 } 431 }
432 432
433 //////////////////////////////////////////////////////////////////////////////// 433 ////////////////////////////////////////////////////////////////////////////////
434 // BrowserTabStripController, TabStripModelObserver implementation: 434 // BrowserTabStripController, TabStripModelObserver implementation:
435 435
436 void BrowserTabStripController::TabInsertedAt(WebContents* contents, 436 void BrowserTabStripController::TabInsertedAt(TabStripModel* tab_strip_model,
437 WebContents* contents,
437 int model_index, 438 int model_index,
438 bool is_active) { 439 bool is_active) {
439 DCHECK(contents); 440 DCHECK(contents);
440 DCHECK(model_->ContainsIndex(model_index)); 441 DCHECK(model_->ContainsIndex(model_index));
441 AddTab(contents, model_index, is_active); 442 AddTab(contents, model_index, is_active);
442 } 443 }
443 444
444 void BrowserTabStripController::TabDetachedAt(WebContents* contents, 445 void BrowserTabStripController::TabDetachedAt(WebContents* contents,
445 int model_index) { 446 int model_index) {
446 // Cancel any pending tab transition. 447 // Cancel any pending tab transition.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 SetTabDataAt(contents, model_index); 480 SetTabDataAt(contents, model_index);
480 } 481 }
481 482
482 void BrowserTabStripController::TabReplacedAt(TabStripModel* tab_strip_model, 483 void BrowserTabStripController::TabReplacedAt(TabStripModel* tab_strip_model,
483 WebContents* old_contents, 484 WebContents* old_contents,
484 WebContents* new_contents, 485 WebContents* new_contents,
485 int model_index) { 486 int model_index) {
486 SetTabDataAt(new_contents, model_index); 487 SetTabDataAt(new_contents, model_index);
487 } 488 }
488 489
489 void BrowserTabStripController::TabPinnedStateChanged(WebContents* contents, 490 void BrowserTabStripController::TabPinnedStateChanged(
490 int model_index) { 491 TabStripModel* tab_strip_model,
492 WebContents* contents,
493 int model_index) {
491 SetTabDataAt(contents, model_index); 494 SetTabDataAt(contents, model_index);
492 } 495 }
493 496
494 void BrowserTabStripController::TabBlockedStateChanged(WebContents* contents, 497 void BrowserTabStripController::TabBlockedStateChanged(WebContents* contents,
495 int model_index) { 498 int model_index) {
496 SetTabDataAt(contents, model_index); 499 SetTabDataAt(contents, model_index);
497 } 500 }
498 501
499 void BrowserTabStripController::SetTabRendererDataFromModel( 502 void BrowserTabStripController::SetTabRendererDataFromModel(
500 WebContents* contents, 503 WebContents* contents,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 content::WebPluginInfo plugin; 584 content::WebPluginInfo plugin;
582 tabstrip_->FileSupported( 585 tabstrip_->FileSupported(
583 url, 586 url,
584 mime_type.empty() || mime_util::IsSupportedMimeType(mime_type) || 587 mime_type.empty() || mime_util::IsSupportedMimeType(mime_type) ||
585 content::PluginService::GetInstance()->GetPluginInfo( 588 content::PluginService::GetInstance()->GetPluginInfo(
586 -1, // process ID 589 -1, // process ID
587 MSG_ROUTING_NONE, // routing ID 590 MSG_ROUTING_NONE, // routing ID
588 model_->profile()->GetResourceContext(), url, GURL(), mime_type, 591 model_->profile()->GetResourceContext(), url, GURL(), mime_type,
589 false, NULL, &plugin, NULL)); 592 false, NULL, &plugin, NULL));
590 } 593 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698