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

Unified Diff: chrome/browser/tabs/tab_strip_model.h

Issue 541056: Tab-modal dialog improvements:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view_gtk.cc ('k') | chrome/browser/tabs/tab_strip_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tabs/tab_strip_model.h
===================================================================
--- chrome/browser/tabs/tab_strip_model.h (revision 36364)
+++ chrome/browser/tabs/tab_strip_model.h (working copy)
@@ -105,6 +105,11 @@
// notified by way of the TabMoved method with |pinned_state_changed| true.
virtual void TabPinnedStateChanged(TabContents* contents, int index) { }
+ // Invoked when the blocked state of a tab changes.
+ // NOTE: This is invoked when a tab becomes blocked/unblocked by a tab modal
+ // window.
+ virtual void TabBlockedStateChanged(TabContents* contents, int index) { }
+
// The TabStripModel now no longer has any "significant" (user created or
// user manipulated) tabs. The implementer may use this as a trigger to try
// and close the window containing the TabStripModel, for example...
@@ -419,6 +424,9 @@
// should be reset when _any_ selection change occurs in the model.
bool ShouldResetGroupOnSelect(TabContents* contents) const;
+ // Changes the blocked state of the tab at |index|.
+ void SetTabBlocked(int index, bool blocked);
+
// Changes the pinned state of the tab at |index|. See description above
// class for details on this.
void SetTabPinned(int index, bool pinned);
@@ -426,6 +434,9 @@
// Returns true if the tab at |index| is pinned.
bool IsTabPinned(int index) const;
+ // Returns true if the tab at |index| is blocked by a tab modal dialog.
+ bool IsTabBlocked(int index) const;
+
// Returns the index of the first tab that is not pinned. This returns
// |count()| if all of the tabs are pinned, and 0 if no tabs are pinned.
int IndexOfFirstNonPinnedTab() const;
@@ -568,7 +579,8 @@
explicit TabContentsData(TabContents* a_contents)
: contents(a_contents),
reset_group_on_select(false),
- pinned(false) {
+ pinned(false),
+ blocked(false) {
SetGroup(NULL);
}
@@ -612,6 +624,9 @@
// Is the tab pinned?
bool pinned;
+
+ // Is the tab interaction blocked by a modal dialog?
+ bool blocked;
};
// The TabContents data currently hosted within this TabStripModel.
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view_gtk.cc ('k') | chrome/browser/tabs/tab_strip_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698