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

Unified Diff: chrome/browser/sessions/tab_restore_service.h

Issue 8662051: retry r112077 - recently closed menu: respect middle click (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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/sessions/tab_restore_service.h
diff --git a/chrome/browser/sessions/tab_restore_service.h b/chrome/browser/sessions/tab_restore_service.h
index ee8dba1e46ebbda210f5910f8959d6c7f3ab5994..c318050cd5bfa2c9e5507d1f279368191eb08d91 100644
--- a/chrome/browser/sessions/tab_restore_service.h
+++ b/chrome/browser/sessions/tab_restore_service.h
@@ -17,6 +17,7 @@
#include "chrome/browser/sessions/session_id.h"
#include "chrome/browser/sessions/session_types.h"
#include "content/browser/in_process_webkit/session_storage_namespace.h"
+#include "webkit/glue/window_open_disposition.h"
class NavigationController;
class Profile;
@@ -153,12 +154,13 @@ class TabRestoreService : public BaseSessionService {
void RestoreMostRecentEntry(TabRestoreServiceDelegate* delegate);
// Restores an entry by id. If there is no entry with an id matching |id|,
- // this does nothing. If |replace_existing_tab| is true and id identifies a
- // tab, the newly created tab replaces the selected tab in |delegate|. If
- // |delegate| is NULL, this creates a new window for the entry.
+ // this does nothing. If |delegate| is NULL, this creates a new window for the
+ // entry. |disposition| is respected, but the attributes (tabstrip index,
+ // browser window) of the tab when it was closed will be respected if
+ // disposition is UNKNOWN.
void RestoreEntryById(TabRestoreServiceDelegate* delegate,
SessionID::id_type id,
- bool replace_existing_tab);
+ WindowOpenDisposition disposition);
// Loads the tabs and previous session. This does nothing if the tabs
// from the previous session have already been loaded.
@@ -263,13 +265,13 @@ class TabRestoreService : public BaseSessionService {
std::vector<Entry*>* loaded_entries);
// This is a helper function for RestoreEntryById() for restoring a single
- // tab. If |replace_existing_tab| is true, the newly created tab replaces the
- // selected tab in |delegate|. If |delegate| is NULL, this creates a new
- // window for the entry. This returns the TabRestoreServiceDelegate into which
- // the tab was restored.
+ // tab. If |delegate| is NULL, this creates a new window for the entry. This
+ // returns the TabRestoreServiceDelegate into which the tab was restored.
+ // |disposition| will be respected, but if it is UNKNOWN then the tab's
+ // original attributes will be respected instead.
TabRestoreServiceDelegate* RestoreTab(const Tab& tab,
TabRestoreServiceDelegate* delegate,
- bool replace_existing_tab);
+ WindowOpenDisposition disposition);
// Returns true if |tab| has more than one navigation. If |tab| has more
// than one navigation |tab->current_navigation_index| is constrained based
« no previous file with comments | « chrome/browser/sessions/session_restore_browsertest.cc ('k') | chrome/browser/sessions/tab_restore_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698