Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3264)

Unified Diff: chrome/browser/ui/android/tab_model/android_live_tab_context.h

Issue 2088443003: Shortcut ctrl+shift+T added on android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unused includes in recently_closed_tab_bridge.cc Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 62%
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..2a0e5417d8b984305580e282fc8c13c45846bed0 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,15 @@ 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_

Powered by Google App Engine
This is Rietveld 408576698