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

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: Adding TabSelectionChanged callback and removing unnecessary method 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..dfd51162dfbcce3c0758f4d86fe819991ed67537 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 TabStripMenuController;
+
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.
James Hawkins 2011/05/18 18:03:10 s/Activate/Activates/
dpapad 2011/06/01 18:05:41 Done.
+ virtual void ActivateTab(TabGtk* tab) = 0;
+
+ // Toggle selection of the specified Tab.
James Hawkins 2011/05/18 18:03:10 s/Toggle/Toggles/
dpapad 2011/06/01 18:05:41 Done.
+ 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 TabStripMenuController* GetTabStripMenuControllerForTab(
+ 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);
@@ -171,7 +186,7 @@ class TabGtk : public TabRendererGtk,
bool dragging_;
// The context menu controller.
- scoped_ptr<ContextMenuController> menu_controller_;
+ scoped_ptr<TabStripMenuController> menu_controller_;
// The windowless widget used to collect input events for the tab. We can't
// use an OwnedWidgetGtk because of the way the dragged tab controller

Powered by Google App Engine
This is Rietveld 408576698