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

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

Issue 1566313002: Remove layout during paint in Tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: With sky's changes to fake controller Created 4 years, 11 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
« 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')
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/fake_base_tab_strip_controller.h" 5 #include "chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h"
6 6
7 #include "chrome/browser/ui/views/tabs/tab_renderer_data.h" 7 #include "chrome/browser/ui/views/tabs/tab_renderer_data.h"
8 #include "chrome/browser/ui/views/tabs/tab_strip.h" 8 #include "chrome/browser/ui/views/tabs/tab_strip.h"
9 9
10 FakeBaseTabStripController::FakeBaseTabStripController() 10 FakeBaseTabStripController::FakeBaseTabStripController()
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 bool FakeBaseTabStripController::IsTabPinned(int index) const { 60 bool FakeBaseTabStripController::IsTabPinned(int index) const {
61 return false; 61 return false;
62 } 62 }
63 63
64 bool FakeBaseTabStripController::IsNewTabPage(int index) const { 64 bool FakeBaseTabStripController::IsNewTabPage(int index) const {
65 return false; 65 return false;
66 } 66 }
67 67
68 void FakeBaseTabStripController::SelectTab(int index) { 68 void FakeBaseTabStripController::SelectTab(int index) {
69 if (!IsValidIndex(index)) 69 if (!IsValidIndex(index) || active_index_ == index)
70 return; 70 return;
71 ui::ListSelectionModel old_selection_model;
72 old_selection_model.SetSelectedIndex(active_index_);
71 active_index_ = index; 73 active_index_ = index;
74 selection_model_.SetSelectedIndex(active_index_);
75 tab_strip_->SetSelection(old_selection_model, selection_model_);
72 } 76 }
73 77
74 void FakeBaseTabStripController::ExtendSelectionTo(int index) { 78 void FakeBaseTabStripController::ExtendSelectionTo(int index) {
75 } 79 }
76 80
77 void FakeBaseTabStripController::ToggleSelected(int index) { 81 void FakeBaseTabStripController::ToggleSelected(int index) {
78 } 82 }
79 83
80 void FakeBaseTabStripController::AddSelectionFromAnchorTo(int index) { 84 void FakeBaseTabStripController::AddSelectionFromAnchorTo(int index) {
81 } 85 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 132
129 void FakeBaseTabStripController::OnStartedDraggingTabs() { 133 void FakeBaseTabStripController::OnStartedDraggingTabs() {
130 } 134 }
131 135
132 void FakeBaseTabStripController::OnStoppedDraggingTabs() { 136 void FakeBaseTabStripController::OnStoppedDraggingTabs() {
133 } 137 }
134 138
135 void FakeBaseTabStripController::CheckFileSupported(const GURL& url) { 139 void FakeBaseTabStripController::CheckFileSupported(const GURL& url) {
136 tab_strip_->FileSupported(url, true); 140 tab_strip_->FileSupported(url, true);
137 } 141 }
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