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

Unified Diff: chrome/browser/ui/gtk/tabs/tab_gtk.h

Issue 6933037: Multi-tab selection for Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing unnecessary includes Created 9 years, 7 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/gtk/tabs/tab_gtk.h
diff --git a/chrome/browser/ui/gtk/tabs/tab_gtk.h b/chrome/browser/ui/gtk/tabs/tab_gtk.h
index 460d25df2ef8a1961869c91d264cdf732dabf013..8f7759a4e16a77bf9ecc0586371a263797936cbc 100644
--- a/chrome/browser/ui/gtk/tabs/tab_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/tab_gtk.h
@@ -12,6 +12,8 @@
#include "chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h"
#include "ui/base/gtk/gtk_signal.h"
+class ContextMenuController;
+
namespace gfx {
class Path;
}
@@ -28,6 +30,9 @@ class TabGtk : public TabRendererGtk,
// TabRenderer::Model.
class TabDelegate {
public:
+ // Returns true if the specified Tab is active.
+ virtual bool IsTabActive(const TabGtk* tab) const = 0;
+
// Returns true if the specified Tab is selected.
virtual bool IsTabSelected(const TabGtk* tab) const = 0;
@@ -37,8 +42,14 @@ class TabGtk : public TabRendererGtk,
// Returns true if the specified Tab is detached.
virtual bool IsTabDetached(const TabGtk* tab) const = 0;
- // Selects the specified Tab.
- virtual void SelectTab(TabGtk* tab) = 0;
+ // Activate the specified Tab.
+ virtual void ActivateTab(TabGtk* tab) = 0;
+
+ // Toggle selection of the specified Tab.
+ virtual void ToggleTabSelection(TabGtk* tab) = 0;
+
+ // Extends selection from the anchor to the specified Tab.
+ virtual void ExtendTabSelection(TabGtk* tab) = 0;
// Closes the specified Tab.
virtual void CloseTab(TabGtk* tab) = 0;
@@ -80,6 +91,11 @@ class TabGtk : public TabRendererGtk,
// Returns the theme provider for icons and colors.
virtual ui::ThemeProvider* GetThemeProvider() = 0;
+ // Returns a context menu controller for |tab|. Caller takes ownership of
+ // the pointed object.
+ virtual ContextMenuController* GetContextMenuControllerForTab(
+ TabGtk* tab) = 0;
+
protected:
virtual ~TabDelegate() {}
};
@@ -101,6 +117,7 @@ class TabGtk : public TabRendererGtk,
bool dragging() const { return dragging_; }
// TabRendererGtk overrides:
+ virtual bool IsActive() const;
virtual bool IsSelected() const;
virtual bool IsVisible() const;
virtual void SetVisible(bool visible) const;
@@ -109,9 +126,7 @@ class TabGtk : public TabRendererGtk,
virtual void SetBounds(const gfx::Rect& bounds);
private:
- class ContextMenuController;
class TabGtkObserverHelper;
- friend class ContextMenuController;
// MessageLoop::Observer implementation:
virtual void WillProcessEvent(GdkEvent* event);

Powered by Google App Engine
This is Rietveld 408576698