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

Side by Side Diff: chrome/browser/gtk/tabs/tab_gtk.h

Issue 113532: Implement DraggedTabGtk, the object that handles rendering either a dragged t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/gtk/tabs/dragged_tab_gtk.cc ('k') | chrome/browser/gtk/tabs/tab_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_GTK_TABS_TAB_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_TABS_TAB_GTK_H_
6 #define CHROME_BROWSER_GTK_TABS_TAB_GTK_H_ 6 #define CHROME_BROWSER_GTK_TABS_TAB_GTK_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "chrome/browser/gtk/tabs/tab_renderer_gtk.h" 9 #include "chrome/browser/gtk/tabs/tab_renderer_gtk.h"
10 #include "chrome/browser/tabs/tab_strip_model.h" 10 #include "chrome/browser/tabs/tab_strip_model.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 TabDelegate* delegate() const { return delegate_; } 73 TabDelegate* delegate() const { return delegate_; }
74 74
75 GtkWidget* widget() const { return event_box_.get(); } 75 GtkWidget* widget() const { return event_box_.get(); }
76 76
77 // Used to set/check whether this Tab is being animated closed. 77 // Used to set/check whether this Tab is being animated closed.
78 void set_closing(bool closing) { closing_ = closing; } 78 void set_closing(bool closing) { closing_ = closing; }
79 bool closing() const { return closing_; } 79 bool closing() const { return closing_; }
80 80
81 // TabRendererGtk overrides: 81 // TabRendererGtk overrides:
82 virtual bool IsSelected() const; 82 virtual bool IsSelected() const;
83 virtual bool IsVisible() const;
84 virtual void SetVisible(bool visible) const;
83 virtual void CloseButtonResized(const gfx::Rect& bounds); 85 virtual void CloseButtonResized(const gfx::Rect& bounds);
84 virtual void Paint(GdkEventExpose* event); 86 virtual void Paint(GdkEventExpose* event);
85 87
88 // The callback that is called for every gdk event. We use it to inspect for
89 // drag-motion events when the drag is outside of the source tab.
90 static void GdkEventHandler(GdkEvent* event, void* tab);
91
86 // button-press-event handler that handles mouse clicks. 92 // button-press-event handler that handles mouse clicks.
87 static gboolean OnMousePress(GtkWidget* widget, GdkEventButton* event, 93 static gboolean OnMousePress(GtkWidget* widget, GdkEventButton* event,
88 TabGtk* tab); 94 TabGtk* tab);
89 95
90 // button-release-event handler that handles mouse click releases. 96 // button-release-event handler that handles mouse click releases.
91 static gboolean OnMouseRelease(GtkWidget* widget, GdkEventButton* event, 97 static gboolean OnMouseRelease(GtkWidget* widget, GdkEventButton* event,
92 TabGtk* tab); 98 TabGtk* tab);
93 99
94 // enter-notify-event handler that signals when the mouse enters the tab. 100 // enter-notify-event handler that signals when the mouse enters the tab.
95 static gboolean OnEnterNotify(GtkWidget* widget, GdkEventCrossing* event, 101 static gboolean OnEnterNotify(GtkWidget* widget, GdkEventCrossing* event,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 146
141 // The context menu controller. 147 // The context menu controller.
142 scoped_ptr<ContextMenuController> menu_controller_; 148 scoped_ptr<ContextMenuController> menu_controller_;
143 149
144 // The close button. 150 // The close button.
145 scoped_ptr<CustomDrawButton> close_button_; 151 scoped_ptr<CustomDrawButton> close_button_;
146 152
147 // The windowless widget used to collect input events for the tab. 153 // The windowless widget used to collect input events for the tab.
148 OwnedWidgetGtk event_box_; 154 OwnedWidgetGtk event_box_;
149 155
156 // True if this tab is being dragged.
157 bool dragging_;
158
150 DISALLOW_COPY_AND_ASSIGN(TabGtk); 159 DISALLOW_COPY_AND_ASSIGN(TabGtk);
151 }; 160 };
152 161
153 #endif // CHROME_BROWSER_GTK_TABS_TAB_GTK_H_ 162 #endif // CHROME_BROWSER_GTK_TABS_TAB_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/gtk/tabs/dragged_tab_gtk.cc ('k') | chrome/browser/gtk/tabs/tab_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698