Index: chrome/browser/ui/android/tab_model/android_live_tab_context.h |
diff --git a/chrome/browser/ui/browser_live_tab_context.h b/chrome/browser/ui/android/tab_model/android_live_tab_context.h |
similarity index 59% |
copy from chrome/browser/ui/browser_live_tab_context.h |
copy to chrome/browser/ui/android/tab_model/android_live_tab_context.h |
index c92b4e0d3a96c96becb986ecdfd9ba911b7d21bb..1b2e86149804768dc476f454dfb31e76ab530af1 100644 |
--- a/chrome/browser/ui/browser_live_tab_context.h |
+++ b/chrome/browser/ui/android/tab_model/android_live_tab_context.h |
@@ -1,9 +1,9 @@ |
-// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_UI_BROWSER_LIVE_TAB_CONTEXT_H_ |
-#define CHROME_BROWSER_UI_BROWSER_LIVE_TAB_CONTEXT_H_ |
+#ifndef CHROME_BROWSER_UI_ANDROID_TAB_MODEL_ANDROID_LIVE_TAB_CONTEXT_H_ |
+#define CHROME_BROWSER_UI_ANDROID_TAB_MODEL_ANDROID_LIVE_TAB_CONTEXT_H_ |
#include <string> |
#include <vector> |
@@ -12,19 +12,17 @@ |
#include "base/macros.h" |
#include "components/sessions/core/live_tab_context.h" |
-class Browser; |
-class Profile; |
- |
namespace content { |
class WebContents; |
} |
-// Implementation of LiveTabContext which uses an instance of |
-// Browser in order to fulfil its duties. |
-class BrowserLiveTabContext : public sessions::LiveTabContext { |
+class TabModel; |
+ |
+// Implementation of LiveTabContext which is used by android. |
+class AndroidLiveTabContext : public sessions::LiveTabContext { |
public: |
- explicit BrowserLiveTabContext(Browser* browser) : browser_(browser) {} |
- ~BrowserLiveTabContext() override {} |
+ explicit AndroidLiveTabContext(TabModel* tab_model); |
+ ~AndroidLiveTabContext() override {} |
// Overridden from LiveTabContext: |
void ShowBrowserWindow() override; |
@@ -54,25 +52,13 @@ class BrowserLiveTabContext : public sessions::LiveTabContext { |
const std::string& user_agent_override) override; |
void CloseTab() override; |
- // see Browser::Create |
- static sessions::LiveTabContext* Create( |
- Profile* profile, |
- const std::string& app_name); |
- |
- // see browser::FindBrowserForWebContents |
- static sessions::LiveTabContext* FindContextForWebContents( |
+ static LiveTabContext* FindContextForWebContents( |
const content::WebContents* contents); |
- // see chrome::FindBrowserWithID |
- // Returns the LiveTabContext of the Browser with |desired_id| if |
- // such a Browser exists. |
- static sessions::LiveTabContext* FindContextWithID( |
- SessionID::id_type desired_id); |
- |
private: |
- Browser* browser_; |
- |
- DISALLOW_COPY_AND_ASSIGN(BrowserLiveTabContext); |
+ TabModel* tab_model_; |
+ DISALLOW_COPY_AND_ASSIGN(AndroidLiveTabContext); |
}; |
-#endif // CHROME_BROWSER_UI_BROWSER_LIVE_TAB_CONTEXT_H_ |
+ |
+#endif // CHROME_BROWSER_UI_ANDROID_TAB_MODEL_ANDROID_LIVE_TAB_CONTEXT_H_ |