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

Side by Side Diff: chrome/browser/sessions/chrome_tab_restore_service_client.h

Issue 1342743002: Remove Profile and HostDesktopType dependencies from core TabRestore code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Mac Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_SESSIONS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_ 5 #ifndef CHROME_BROWSER_SESSIONS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_
6 #define CHROME_BROWSER_SESSIONS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_ 6 #define CHROME_BROWSER_SESSIONS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "components/sessions/core/tab_restore_service_client.h" 9 #include "components/sessions/core/tab_restore_service_client.h"
10 10
11 class Profile; 11 class Profile;
12 12
13 // ChromeTabRestoreServiceClient provides an implementation of 13 // ChromeTabRestoreServiceClient provides an implementation of
14 // TabRestoreServiceClient that depends on chrome/. 14 // TabRestoreServiceClient that depends on chrome/.
15 class ChromeTabRestoreServiceClient : public sessions::TabRestoreServiceClient { 15 class ChromeTabRestoreServiceClient : public sessions::TabRestoreServiceClient {
16 public: 16 public:
17 explicit ChromeTabRestoreServiceClient(Profile* profile); 17 explicit ChromeTabRestoreServiceClient(Profile* profile);
18 ~ChromeTabRestoreServiceClient() override; 18 ~ChromeTabRestoreServiceClient() override;
19 19
20 private: 20 private:
21 // TabRestoreServiceClient: 21 // TabRestoreServiceClient:
22 TabRestoreServiceDelegate* CreateTabRestoreServiceDelegate(
23 int host_desktop_type,
24 const std::string& app_name) override;
25 TabRestoreServiceDelegate* FindTabRestoreServiceDelegateForWebContents(
26 const content::WebContents* contents) override;
27 TabRestoreServiceDelegate* FindTabRestoreServiceDelegateWithID(
28 SessionID::id_type desired_id,
29 int host_desktop_type) override;
22 bool ShouldTrackURLForRestore(const GURL& url) override; 30 bool ShouldTrackURLForRestore(const GURL& url) override;
23 base::SequencedWorkerPool* GetBlockingPool() override; 31 base::SequencedWorkerPool* GetBlockingPool() override;
24 base::FilePath GetPathToSaveTo() override; 32 base::FilePath GetPathToSaveTo() override;
25 GURL GetNewTabURL() override; 33 GURL GetNewTabURL() override;
26 bool HasLastSession() override; 34 bool HasLastSession() override;
27 void GetLastSession(const sessions::GetLastSessionCallback& callback, 35 void GetLastSession(const sessions::GetLastSessionCallback& callback,
28 base::CancelableTaskTracker* tracker) override; 36 base::CancelableTaskTracker* tracker) override;
29 void OnTabRestored(const GURL& url) override; 37 void OnTabRestored(const GURL& url) override;
30 38
31 Profile* profile_; 39 Profile* profile_;
32 40
33 DISALLOW_COPY_AND_ASSIGN(ChromeTabRestoreServiceClient); 41 DISALLOW_COPY_AND_ASSIGN(ChromeTabRestoreServiceClient);
34 }; 42 };
35 43
36 #endif // CHROME_BROWSER_SESSIONS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_ 44 #endif // CHROME_BROWSER_SESSIONS_CHROME_TAB_RESTORE_SERVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/sessions/sessions_api.cc ('k') | chrome/browser/sessions/chrome_tab_restore_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698