| 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 "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" |
| 11 #include "chrome/browser/chrome_notification_types.h" |
| 11 #include "chrome/browser/extensions/tab_helper.h" | 12 #include "chrome/browser/extensions/tab_helper.h" |
| 12 #include "chrome/browser/favicon/favicon_tab_helper.h" | 13 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/browser/ui/browser_tabstrip.h" | 16 #include "chrome/browser/ui/browser_tabstrip.h" |
| 16 #include "chrome/browser/ui/tabs/tab_menu_model.h" | 17 #include "chrome/browser/ui/tabs/tab_menu_model.h" |
| 17 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 18 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 18 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h" | 19 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h" |
| 19 #include "chrome/browser/ui/tabs/tab_utils.h" | 20 #include "chrome/browser/ui/tabs/tab_utils.h" |
| 20 #include "chrome/browser/ui/views/frame/browser_view.h" | 21 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 21 #include "chrome/browser/ui/views/tabs/tab.h" | 22 #include "chrome/browser/ui/views/tabs/tab.h" |
| 22 #include "chrome/browser/ui/views/tabs/tab_renderer_data.h" | 23 #include "chrome/browser/ui/views/tabs/tab_renderer_data.h" |
| 23 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 24 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 24 #include "chrome/common/chrome_notification_types.h" | |
| 25 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
| 26 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
| 27 #include "chrome/common/url_constants.h" | 27 #include "chrome/common/url_constants.h" |
| 28 #include "content/public/browser/notification_service.h" | 28 #include "content/public/browser/notification_service.h" |
| 29 #include "content/public/browser/user_metrics.h" | 29 #include "content/public/browser/user_metrics.h" |
| 30 #include "content/public/browser/web_contents.h" | 30 #include "content/public/browser/web_contents.h" |
| 31 #include "ui/base/layout.h" | 31 #include "ui/base/layout.h" |
| 32 #include "ui/base/models/list_selection_model.h" | 32 #include "ui/base/models/list_selection_model.h" |
| 33 #include "ui/gfx/image/image.h" | 33 #include "ui/gfx/image/image.h" |
| 34 #include "ui/views/controls/menu/menu_item_view.h" | 34 #include "ui/views/controls/menu/menu_item_view.h" |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 SetTabRendererDataFromModel(contents, index, &data, NEW_TAB); | 524 SetTabRendererDataFromModel(contents, index, &data, NEW_TAB); |
| 525 tabstrip_->AddTabAt(index, data, is_active); | 525 tabstrip_->AddTabAt(index, data, is_active); |
| 526 } | 526 } |
| 527 | 527 |
| 528 void BrowserTabStripController::UpdateLayoutType() { | 528 void BrowserTabStripController::UpdateLayoutType() { |
| 529 bool adjust_layout = false; | 529 bool adjust_layout = false; |
| 530 TabStripLayoutType layout_type = | 530 TabStripLayoutType layout_type = |
| 531 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout); | 531 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout); |
| 532 tabstrip_->SetLayoutType(layout_type, adjust_layout); | 532 tabstrip_->SetLayoutType(layout_type, adjust_layout); |
| 533 } | 533 } |
| OLD | NEW |