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

Side by Side Diff: chrome/browser/ui/gtk/tabs/tab_strip_gtk.h

Issue 8897006: GTK: Remove deprecated methods and replace them with the new standard calls. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_UI_GTK_TABS_TAB_STRIP_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_TABS_TAB_STRIP_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_TABS_TAB_STRIP_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_TABS_TAB_STRIP_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 #include <vector> 10 #include <vector>
(...skipping 12 matching lines...) Expand all
23 #include "content/public/browser/notification_registrar.h" 23 #include "content/public/browser/notification_registrar.h"
24 #include "ui/base/gtk/gtk_signal.h" 24 #include "ui/base/gtk/gtk_signal.h"
25 #include "ui/base/gtk/owned_widget_gtk.h" 25 #include "ui/base/gtk/owned_widget_gtk.h"
26 #include "ui/gfx/rect.h" 26 #include "ui/gfx/rect.h"
27 27
28 class BrowserWindowGtk; 28 class BrowserWindowGtk;
29 class CustomDrawButton; 29 class CustomDrawButton;
30 class DraggedTabControllerGtk; 30 class DraggedTabControllerGtk;
31 class GtkThemeService; 31 class GtkThemeService;
32 32
33 namespace gfx {
34 class Image;
35 }
36
33 class TabStripGtk : public TabStripModelObserver, 37 class TabStripGtk : public TabStripModelObserver,
34 public TabGtk::TabDelegate, 38 public TabGtk::TabDelegate,
35 public MessageLoopForUI::Observer, 39 public MessageLoopForUI::Observer,
36 public content::NotificationObserver, 40 public content::NotificationObserver,
37 public TabstripOriginProvider, 41 public TabstripOriginProvider,
38 public ViewIDUtil::Delegate { 42 public ViewIDUtil::Delegate {
39 public: 43 public:
40 class TabAnimation; 44 class TabAnimation;
41 45
42 TabStripGtk(TabStripModel* model, BrowserWindowGtk* window); 46 TabStripGtk(TabStripModel* model, BrowserWindowGtk* window);
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // Direction the arrow should point in. If true, the arrow is displayed 231 // Direction the arrow should point in. If true, the arrow is displayed
228 // above the tab and points down. If false, the arrow is displayed beneath 232 // above the tab and points down. If false, the arrow is displayed beneath
229 // the tab and points up. 233 // the tab and points up.
230 bool point_down; 234 bool point_down;
231 235
232 // Transparent container window used to render the drop indicator over the 236 // Transparent container window used to render the drop indicator over the
233 // tabstrip and toolbar. 237 // tabstrip and toolbar.
234 GtkWidget* container; 238 GtkWidget* container;
235 239
236 // The drop indicator image. 240 // The drop indicator image.
237 GdkPixbuf* drop_arrow; 241 gfx::Image* drop_arrow;
238 242
239 private: 243 private:
240 DISALLOW_COPY_AND_ASSIGN(DropInfo); 244 DISALLOW_COPY_AND_ASSIGN(DropInfo);
241 }; 245 };
242 246
243 // Map signal handler that sets initial z-ordering. The widgets need to be 247 // Map signal handler that sets initial z-ordering. The widgets need to be
244 // realized before we can set the stacking. We use the "map" signal since the 248 // realized before we can set the stacking. We use the "map" signal since the
245 // "realize" signal is called before the child widgets get realized. 249 // "realize" signal is called before the child widgets get realized.
246 CHROMEGTK_CALLBACK_0(TabStripGtk, void, OnMap); 250 CHROMEGTK_CALLBACK_0(TabStripGtk, void, OnMap);
247 251
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 // Sets the location of the drop, repainting as necessary. 392 // Sets the location of the drop, repainting as necessary.
389 void SetDropIndex(int index, bool drop_before); 393 void SetDropIndex(int index, bool drop_before);
390 394
391 // Determines whether the data is acceptable by the tabstrip and opens a new 395 // Determines whether the data is acceptable by the tabstrip and opens a new
392 // tab with the data as URL if it is. Returns true if the drop was 396 // tab with the data as URL if it is. Returns true if the drop was
393 // successful. 397 // successful.
394 bool CompleteDrop(guchar* data, bool is_plain_text); 398 bool CompleteDrop(guchar* data, bool is_plain_text);
395 399
396 // Returns the image to use for indicating a drop on a tab. If is_down is 400 // Returns the image to use for indicating a drop on a tab. If is_down is
397 // true, this returns an arrow pointing down. 401 // true, this returns an arrow pointing down.
398 static GdkPixbuf* GetDropArrowImage(bool is_down); 402 static gfx::Image* GetDropArrowImage(bool is_down);
399 403
400 // -- Animations ------------------------------------------------------------- 404 // -- Animations -------------------------------------------------------------
401 405
402 // Stops the current animation. 406 // Stops the current animation.
403 void StopAnimation(); 407 void StopAnimation();
404 408
405 // A generic Layout method for various classes of TabStrip animations, 409 // A generic Layout method for various classes of TabStrip animations,
406 // including Insert, Remove and Resize Layout cases. 410 // including Insert, Remove and Resize Layout cases.
407 void AnimationLayout(double unselected_width); 411 void AnimationLayout(double unselected_width);
408 412
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 494
491 // Helper for performing tab selection as a result of dragging over a tab. 495 // Helper for performing tab selection as a result of dragging over a tab.
492 HoverTabSelector hover_tab_selector_; 496 HoverTabSelector hover_tab_selector_;
493 497
494 content::NotificationRegistrar registrar_; 498 content::NotificationRegistrar registrar_;
495 499
496 DISALLOW_COPY_AND_ASSIGN(TabStripGtk); 500 DISALLOW_COPY_AND_ASSIGN(TabStripGtk);
497 }; 501 };
498 502
499 #endif // CHROME_BROWSER_UI_GTK_TABS_TAB_STRIP_GTK_H_ 503 #endif // CHROME_BROWSER_UI_GTK_TABS_TAB_STRIP_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698