OLD | NEW |
1 // Copyright (c) 2011 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/tabs/pinned_tab_codec.h" | 5 #include "chrome/browser/tabs/pinned_tab_codec.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/browser/extensions/extension_tab_helper.h" | 8 #include "chrome/browser/extensions/extension_tab_helper.h" |
9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/tabs/tab_strip_model.h" | 11 #include "chrome/browser/tabs/tab_strip_model.h" |
12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
13 #include "chrome/browser/ui/browser_list.h" | 13 #include "chrome/browser/ui/browser_list.h" |
14 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 14 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
15 #include "chrome/common/extensions/extension.h" | 15 #include "chrome/common/extensions/extension.h" |
16 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
17 #include "content/browser/tab_contents/tab_contents.h" | 17 #include "content/browser/tab_contents/tab_contents.h" |
18 #include "content/common/page_transition_types.h" | |
19 | 18 |
20 typedef BrowserInit::LaunchWithProfile::Tab Tab; | 19 typedef BrowserInit::LaunchWithProfile::Tab Tab; |
21 | 20 |
22 // Key used in dictionaries for the app id. | 21 // Key used in dictionaries for the app id. |
23 static const char kAppID[] = "app_id"; | 22 static const char kAppID[] = "app_id"; |
24 | 23 |
25 // Key used in dictionaries for the url. | 24 // Key used in dictionaries for the url. |
26 static const char kURL[] = "url"; | 25 static const char kURL[] = "url"; |
27 | 26 |
28 // Returns true if |browser| has any pinned tabs. | 27 // Returns true if |browser| has any pinned tabs. |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 for (size_t i = 0, max = pref_value->GetSize(); i < max; ++i) { | 125 for (size_t i = 0, max = pref_value->GetSize(); i < max; ++i) { |
127 DictionaryValue* values = NULL; | 126 DictionaryValue* values = NULL; |
128 if (pref_value->GetDictionary(i, &values)) { | 127 if (pref_value->GetDictionary(i, &values)) { |
129 Tab tab; | 128 Tab tab; |
130 if (DecodeTab(*values, &tab)) | 129 if (DecodeTab(*values, &tab)) |
131 results.push_back(tab); | 130 results.push_back(tab); |
132 } | 131 } |
133 } | 132 } |
134 return results; | 133 return results; |
135 } | 134 } |
OLD | NEW |