| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/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/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/metrics/user_metrics.h" | 10 #include "chrome/browser/metrics/user_metrics.h" |
| 11 #include "chrome/browser/renderer_host/render_view_host.h" | 11 #include "chrome/browser/renderer_host/render_view_host.h" |
| 12 #include "chrome/browser/tab_contents/tab_contents.h" | 12 #include "chrome/browser/tab_contents/tab_contents.h" |
| 13 #include "chrome/browser/tabs/tab_strip_model.h" | 13 #include "chrome/browser/tabs/tab_strip_model.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 15 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 DCHECK(type.value == NotificationType::TAB_CLOSEABLE_STATE_CHANGED); | 429 DCHECK(type.value == NotificationType::TAB_CLOSEABLE_STATE_CHANGED); |
| 430 // Note that this notification may be fired during a model mutation and | 430 // Note that this notification may be fired during a model mutation and |
| 431 // possibly before the tabstrip has processed the change. | 431 // possibly before the tabstrip has processed the change. |
| 432 // Here, we just re-layout each existing tab to reflect the change in its | 432 // Here, we just re-layout each existing tab to reflect the change in its |
| 433 // closeable state, and then schedule paint for entire tabstrip. | 433 // closeable state, and then schedule paint for entire tabstrip. |
| 434 for (int i = 0; i < tabstrip_->tab_count(); ++i) { | 434 for (int i = 0; i < tabstrip_->tab_count(); ++i) { |
| 435 tabstrip_->base_tab_at_tab_index(i)->Layout(); | 435 tabstrip_->base_tab_at_tab_index(i)->Layout(); |
| 436 } | 436 } |
| 437 tabstrip_->SchedulePaint(); | 437 tabstrip_->SchedulePaint(); |
| 438 } | 438 } |
| OLD | NEW |