OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/android/tab_android.h" | 5 #include "chrome/browser/android/tab_android.h" |
6 #include "chrome/browser/profiles/profile.h" | 6 #include "chrome/browser/profiles/profile.h" |
7 #include "chrome/browser/ui/android/tab_model/android_live_tab_context.h" | 7 #include "chrome/browser/ui/android/tab_model/android_live_tab_context.h" |
8 #include "chrome/browser/ui/android/tab_model/tab_model.h" | 8 #include "chrome/browser/ui/android/tab_model/tab_model.h" |
9 #include "chrome/browser/ui/android/tab_model/tab_model_list.h" | 9 #include "chrome/browser/ui/android/tab_model/tab_model_list.h" |
10 #include "components/sessions/content/content_live_tab.h" | 10 #include "components/sessions/content/content_live_tab.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
52 return nullptr; | 52 return nullptr; |
53 | 53 |
54 return sessions::ContentLiveTab::GetForWebContents(web_contents); | 54 return sessions::ContentLiveTab::GetForWebContents(web_contents); |
55 } | 55 } |
56 | 56 |
57 // Not supported by android. | 57 // Not supported by android. |
58 bool AndroidLiveTabContext::IsTabPinned(int index) const { | 58 bool AndroidLiveTabContext::IsTabPinned(int index) const { |
59 return false; | 59 return false; |
60 } | 60 } |
61 | 61 |
62 // Not supported by android. | |
sky
2017/05/12 02:42:06
supported->applicable to?
chrisha
2017/06/28 18:30:42
I was copy-pasting similar comments from in this f
| |
63 const gfx::Rect AndroidLiveTabContext::GetBounds() const { | |
64 return gfx::Rect(); | |
65 } | |
66 | |
67 // Not supported by android. | |
68 ui::WindowShowState AndroidLiveTabContext::GetShowState() const { | |
69 return ui::SHOW_STATE_NORMAL; | |
70 } | |
71 | |
72 // Not supported by android. | |
73 std::string AndroidLiveTabContext::GetWorkspace() const { | |
74 return ""; | |
sky
2017/05/12 02:42:06
"" -> std::string()
chrisha
2017/06/28 18:30:42
Done.
| |
75 } | |
76 | |
62 sessions::LiveTab* AndroidLiveTabContext::AddRestoredTab( | 77 sessions::LiveTab* AndroidLiveTabContext::AddRestoredTab( |
63 const std::vector<sessions::SerializedNavigationEntry>& navigations, | 78 const std::vector<sessions::SerializedNavigationEntry>& navigations, |
64 int tab_index, | 79 int tab_index, |
65 int selected_navigation, | 80 int selected_navigation, |
66 const std::string& extension_app_id, | 81 const std::string& extension_app_id, |
67 bool select, | 82 bool select, |
68 bool pin, | 83 bool pin, |
69 bool from_last_session, | 84 bool from_last_session, |
70 const sessions::PlatformSpecificTabData* tab_platform_data, | 85 const sessions::PlatformSpecificTabData* tab_platform_data, |
71 const std::string& user_agent_override) { | 86 const std::string& user_agent_override) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
129 for (auto it = TabModelList::begin(); it != TabModelList::end(); ++it) { | 144 for (auto it = TabModelList::begin(); it != TabModelList::end(); ++it) { |
130 TabModel* model = *it; | 145 TabModel* model = *it; |
131 if (!model->IsOffTheRecord()) { | 146 if (!model->IsOffTheRecord()) { |
132 return model->GetLiveTabContext(); | 147 return model->GetLiveTabContext(); |
133 } | 148 } |
134 } | 149 } |
135 } | 150 } |
136 | 151 |
137 return tab_model ? tab_model->GetLiveTabContext() : nullptr; | 152 return tab_model ? tab_model->GetLiveTabContext() : nullptr; |
138 } | 153 } |
OLD | NEW |