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

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

Issue 8588068: GTK: Create the start of a compatibility header wrapping deprecated methods. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to ToT and remove views/ cleanups. Created 9 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/gtk/status_bubble_gtk.cc ('k') | chrome/browser/ui/login/login_prompt_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) 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 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" 5 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 16 matching lines...) Expand all
27 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 27 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
28 #include "chrome/common/chrome_notification_types.h" 28 #include "chrome/common/chrome_notification_types.h"
29 #include "content/browser/tab_contents/tab_contents.h" 29 #include "content/browser/tab_contents/tab_contents.h"
30 #include "content/public/browser/notification_source.h" 30 #include "content/public/browser/notification_source.h"
31 #include "grit/theme_resources.h" 31 #include "grit/theme_resources.h"
32 #include "grit/theme_resources_standard.h" 32 #include "grit/theme_resources_standard.h"
33 #include "grit/ui_resources.h" 33 #include "grit/ui_resources.h"
34 #include "ui/base/animation/animation_delegate.h" 34 #include "ui/base/animation/animation_delegate.h"
35 #include "ui/base/animation/slide_animation.h" 35 #include "ui/base/animation/slide_animation.h"
36 #include "ui/base/dragdrop/gtk_dnd_util.h" 36 #include "ui/base/dragdrop/gtk_dnd_util.h"
37 #include "ui/base/gtk/gtk_compat.h"
37 #include "ui/base/gtk/gtk_screen_utils.h" 38 #include "ui/base/gtk/gtk_screen_utils.h"
38 #include "ui/base/resource/resource_bundle.h" 39 #include "ui/base/resource/resource_bundle.h"
39 #include "ui/gfx/gtk_util.h" 40 #include "ui/gfx/gtk_util.h"
40 #include "ui/gfx/image/image.h" 41 #include "ui/gfx/image/image.h"
41 #include "ui/gfx/point.h" 42 #include "ui/gfx/point.h"
42 43
43 namespace { 44 namespace {
44 45
45 const int kDefaultAnimationDurationMs = 100; 46 const int kDefaultAnimationDurationMs = 100;
46 const int kResizeLayoutAnimationDurationMs = 166; 47 const int kResizeLayoutAnimationDurationMs = 166;
(...skipping 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 GdkScreen* screen = gdk_screen_get_default(); 1605 GdkScreen* screen = gdk_screen_get_default();
1605 GdkDisplay* display = gdk_screen_get_display(screen); 1606 GdkDisplay* display = gdk_screen_get_display(screen);
1606 gint x, y; 1607 gint x, y;
1607 gdk_display_get_pointer(display, NULL, &x, &y, NULL); 1608 gdk_display_get_pointer(display, NULL, &x, &y, NULL);
1608 gfx::Point cursor_point(x, y); 1609 gfx::Point cursor_point(x, y);
1609 1610
1610 return bds.Contains(cursor_point); 1611 return bds.Contains(cursor_point);
1611 } 1612 }
1612 1613
1613 void TabStripGtk::ReStack() { 1614 void TabStripGtk::ReStack() {
1614 if (!GTK_WIDGET_REALIZED(tabstrip_.get())) { 1615 if (!gtk_widget_get_realized(tabstrip_.get())) {
1615 // If the window isn't realized yet, we can't stack them yet. It will be 1616 // If the window isn't realized yet, we can't stack them yet. It will be
1616 // done by the OnMap signal handler. 1617 // done by the OnMap signal handler.
1617 return; 1618 return;
1618 } 1619 }
1619 int tab_count = GetTabCount(); 1620 int tab_count = GetTabCount();
1620 TabGtk* active_tab = NULL; 1621 TabGtk* active_tab = NULL;
1621 for (int i = tab_count - 1; i >= 0; --i) { 1622 for (int i = tab_count - 1; i >= 0; --i) {
1622 TabGtk* tab = GetTabAt(i); 1623 TabGtk* tab = GetTabAt(i);
1623 if (tab->IsActive()) 1624 if (tab->IsActive())
1624 active_tab = tab; 1625 active_tab = tab;
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
2229 } 2230 }
2230 2231
2231 void TabStripGtk::SetNewTabButtonBackground() { 2232 void TabStripGtk::SetNewTabButtonBackground() {
2232 SkColor color = theme_service_->GetColor( 2233 SkColor color = theme_service_->GetColor(
2233 ThemeService::COLOR_BUTTON_BACKGROUND); 2234 ThemeService::COLOR_BUTTON_BACKGROUND);
2234 SkBitmap* background = theme_service_->GetBitmapNamed( 2235 SkBitmap* background = theme_service_->GetBitmapNamed(
2235 IDR_THEME_WINDOW_CONTROL_BACKGROUND); 2236 IDR_THEME_WINDOW_CONTROL_BACKGROUND);
2236 SkBitmap* mask = theme_service_->GetBitmapNamed(IDR_NEWTAB_BUTTON_MASK); 2237 SkBitmap* mask = theme_service_->GetBitmapNamed(IDR_NEWTAB_BUTTON_MASK);
2237 newtab_button_->SetBackground(color, background, mask); 2238 newtab_button_->SetBackground(color, background, mask);
2238 } 2239 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/status_bubble_gtk.cc ('k') | chrome/browser/ui/login/login_prompt_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698