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

Side by Side Diff: chrome/browser/gtk/bookmark_bar_gtk.h

Issue 159419: Correctly update drag status for drags over renderer. This makes things look ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: do what Brett says Created 11 years, 5 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
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_BOOKMARK_BAR_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_BOOKMARK_BAR_GTK_H_
6 #define CHROME_BROWSER_GTK_BOOKMARK_BAR_GTK_H_ 6 #define CHROME_BROWSER_GTK_BOOKMARK_BAR_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // Finds the BookmarkNode from the model associated with |button|. 135 // Finds the BookmarkNode from the model associated with |button|.
136 const BookmarkNode* GetNodeForToolButton(GtkWidget* button); 136 const BookmarkNode* GetNodeForToolButton(GtkWidget* button);
137 137
138 // Loads the background image into memory, or does nothing if already loaded. 138 // Loads the background image into memory, or does nothing if already loaded.
139 void InitBackground(); 139 void InitBackground();
140 140
141 // Creates and displays a popup menu for BookmarkNode |node|. 141 // Creates and displays a popup menu for BookmarkNode |node|.
142 void PopupMenuForNode(GtkWidget* sender, const BookmarkNode* node, 142 void PopupMenuForNode(GtkWidget* sender, const BookmarkNode* node,
143 GdkEventButton* event); 143 GdkEventButton* event);
144 144
145 // GtkButton callbacks 145 // GtkButton callbacks.
146 static gboolean OnButtonPressed(GtkWidget* sender, 146 static gboolean OnButtonPressed(GtkWidget* sender,
147 GdkEventButton* event, 147 GdkEventButton* event,
148 BookmarkBarGtk* bar); 148 BookmarkBarGtk* bar);
149 static gboolean OnButtonReleased(GtkWidget* sender, 149 static gboolean OnButtonReleased(GtkWidget* sender,
150 GdkEventButton* event, 150 GdkEventButton* event,
151 BookmarkBarGtk* bar); 151 BookmarkBarGtk* bar);
152 static void OnButtonDragBegin(GtkWidget* widget, 152 static void OnButtonDragBegin(GtkWidget* widget,
153 GdkDragContext* drag_context, 153 GdkDragContext* drag_context,
154 BookmarkBarGtk* bar); 154 BookmarkBarGtk* bar);
155 static void OnButtonDragEnd(GtkWidget* button, 155 static void OnButtonDragEnd(GtkWidget* button,
156 GdkDragContext* drag_context, 156 GdkDragContext* drag_context,
157 BookmarkBarGtk* bar); 157 BookmarkBarGtk* bar);
158 static void OnButtonDragGet(GtkWidget* widget, GdkDragContext* context, 158 static void OnButtonDragGet(GtkWidget* widget, GdkDragContext* context,
159 GtkSelectionData* selection_data, 159 GtkSelectionData* selection_data,
160 guint target_type, guint time, 160 guint target_type, guint time,
161 BookmarkBarGtk* bar); 161 BookmarkBarGtk* bar);
162 162
163 // GtkButton callbacks for folder buttons 163 // GtkButton callbacks for folder buttons.
164 static gboolean OnFolderButtonReleased(GtkWidget* sender, 164 static gboolean OnFolderButtonReleased(GtkWidget* sender,
165 GdkEventButton* event, 165 GdkEventButton* event,
166 BookmarkBarGtk* bar); 166 BookmarkBarGtk* bar);
167 static void OnFolderDragReceived(GtkWidget* widget,
168 GdkDragContext* context,
169 gint x, gint y,
170 GtkSelectionData* selection_data,
171 guint target_type, guint time,
172 BookmarkBarGtk* bar);
173 167
174 // GtkToolbar callbacks 168 // GtkToolbar callbacks.
175 static gboolean OnToolbarExpose(GtkWidget* widget, GdkEventExpose* event, 169 static gboolean OnToolbarExpose(GtkWidget* widget, GdkEventExpose* event,
176 BookmarkBarGtk* window); 170 BookmarkBarGtk* window);
177 static gboolean OnToolbarDragMotion(GtkToolbar* toolbar, 171 static gboolean OnToolbarDragMotion(GtkToolbar* toolbar,
178 GdkDragContext* context, 172 GdkDragContext* context,
179 gint x, 173 gint x,
180 gint y, 174 gint y,
181 guint time, 175 guint time,
182 BookmarkBarGtk* bar); 176 BookmarkBarGtk* bar);
183 static void OnToolbarDragLeave(GtkToolbar* toolbar, 177 static void OnToolbarDragLeave(GtkToolbar* toolbar,
184 GdkDragContext* context, 178 GdkDragContext* context,
185 guint time, 179 guint time,
186 BookmarkBarGtk* bar); 180 BookmarkBarGtk* bar);
187 static void OnToolbarDragReceived(GtkWidget* widget, 181
188 GdkDragContext* context, 182 // Used for both folder buttons and the toolbar.
189 gint x, gint y, 183 static void OnDragReceived(GtkWidget* widget,
190 GtkSelectionData* selection_data, 184 GdkDragContext* context,
191 guint target_type, guint time, 185 gint x, gint y,
192 BookmarkBarGtk* bar); 186 GtkSelectionData* selection_data,
187 guint target_type, guint time,
188 BookmarkBarGtk* bar);
193 189
194 // GtkHBox callbacks. 190 // GtkHBox callbacks.
195 static gboolean OnHBoxExpose(GtkWidget* widget, GdkEventExpose* event, 191 static gboolean OnHBoxExpose(GtkWidget* widget, GdkEventExpose* event,
196 BookmarkBarGtk* window); 192 BookmarkBarGtk* window);
197 193
198 194
199 Profile* profile_; 195 Profile* profile_;
200 196
201 // Used for opening urls. 197 // Used for opening urls.
202 PageNavigator* page_navigator_; 198 PageNavigator* page_navigator_;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 247
252 // Paints the background for our bookmark bar. 248 // Paints the background for our bookmark bar.
253 scoped_ptr<NineBox> background_ninebox_; 249 scoped_ptr<NineBox> background_ninebox_;
254 250
255 scoped_ptr<SlideAnimation> slide_animation_; 251 scoped_ptr<SlideAnimation> slide_animation_;
256 252
257 NotificationRegistrar registrar_; 253 NotificationRegistrar registrar_;
258 }; 254 };
259 255
260 #endif // CHROME_BROWSER_GTK_BOOKMARK_BAR_GTK_H_ 256 #endif // CHROME_BROWSER_GTK_BOOKMARK_BAR_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698