| 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/android/tab_model/tab_model_list.h" | 5 #include "chrome/browser/ui/android/tab_model/tab_model_list.h" |
| 6 | 6 |
| 7 #include "chrome/browser/android/tab_android.h" | 7 #include "chrome/browser/android/tab_android.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/android/tab_model/tab_model.h" | 9 #include "chrome/browser/ui/android/tab_model/tab_model.h" |
| 10 #include "chrome/browser/ui/browser_navigator.h" | 10 #include "chrome/browser/ui/browser_navigator_params.h" |
| 11 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 // Maintains and gives access to a static list of TabModel instances. | 15 // Maintains and gives access to a static list of TabModel instances. |
| 16 static TabModelList::TabModelVector& tab_models() { | 16 static TabModelList::TabModelVector& tab_models() { |
| 17 CR_DEFINE_STATIC_LOCAL(TabModelList::TabModelVector, | 17 CR_DEFINE_STATIC_LOCAL(TabModelList::TabModelVector, |
| 18 tab_model_vector, ()); | 18 tab_model_vector, ()); |
| 19 return tab_model_vector; | 19 return tab_model_vector; |
| 20 } | 20 } |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 } | 94 } |
| 95 | 95 |
| 96 size_t TabModelList::size() { | 96 size_t TabModelList::size() { |
| 97 return tab_models().size(); | 97 return tab_models().size(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 TabModel* TabModelList::get(size_t index) { | 100 TabModel* TabModelList::get(size_t index) { |
| 101 DCHECK_LT(index, size()); | 101 DCHECK_LT(index, size()); |
| 102 return tab_models()[index]; | 102 return tab_models()[index]; |
| 103 } | 103 } |
| OLD | NEW |