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

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

Issue 8196001: content: Split web_drag_dest_gtk.cc into chrome/ and content/ parts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix viewgtk compile Created 9 years, 2 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) 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/common/notification_service.h" 30 #include "content/common/notification_service.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_screen_utils.h"
37 #include "ui/base/resource/resource_bundle.h" 38 #include "ui/base/resource/resource_bundle.h"
38 #include "ui/gfx/gtk_util.h" 39 #include "ui/gfx/gtk_util.h"
39 #include "ui/gfx/image/image.h" 40 #include "ui/gfx/image/image.h"
40 #include "ui/gfx/point.h" 41 #include "ui/gfx/point.h"
41 42
42 namespace { 43 namespace {
43 44
44 const int kDefaultAnimationDurationMs = 100; 45 const int kDefaultAnimationDurationMs = 100;
45 const int kResizeLayoutAnimationDurationMs = 166; 46 const int kResizeLayoutAnimationDurationMs = 166;
46 const int kReorderAnimationDurationMs = 166; 47 const int kReorderAnimationDurationMs = 166;
(...skipping 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1797 CreateContainer(); 1798 CreateContainer();
1798 drop_arrow = GetDropArrowImage(point_down); 1799 drop_arrow = GetDropArrowImage(point_down);
1799 } 1800 }
1800 1801
1801 TabStripGtk::DropInfo::~DropInfo() { 1802 TabStripGtk::DropInfo::~DropInfo() {
1802 DestroyContainer(); 1803 DestroyContainer();
1803 } 1804 }
1804 1805
1805 gboolean TabStripGtk::DropInfo::OnExposeEvent(GtkWidget* widget, 1806 gboolean TabStripGtk::DropInfo::OnExposeEvent(GtkWidget* widget,
1806 GdkEventExpose* event) { 1807 GdkEventExpose* event) {
1807 if (gtk_util::IsScreenComposited()) { 1808 if (ui::IsScreenComposited()) {
1808 SetContainerTransparency(); 1809 SetContainerTransparency();
1809 } else { 1810 } else {
1810 SetContainerShapeMask(); 1811 SetContainerShapeMask();
1811 } 1812 }
1812 1813
1813 gdk_pixbuf_render_to_drawable(drop_arrow, 1814 gdk_pixbuf_render_to_drawable(drop_arrow,
1814 container->window, 1815 container->window,
1815 0, 0, 0, 1816 0, 0, 0,
1816 0, 0, 1817 0, 0,
1817 drop_indicator_width, 1818 drop_indicator_width,
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
2186 2187
2187 // Let the middle mouse button initiate clicks as well. 2188 // Let the middle mouse button initiate clicks as well.
2188 gtk_util::SetButtonTriggersNavigation(button->widget()); 2189 gtk_util::SetButtonTriggersNavigation(button->widget());
2189 g_signal_connect(button->widget(), "clicked", 2190 g_signal_connect(button->widget(), "clicked",
2190 G_CALLBACK(OnNewTabClickedThunk), this); 2191 G_CALLBACK(OnNewTabClickedThunk), this);
2191 gtk_widget_set_can_focus(button->widget(), FALSE); 2192 gtk_widget_set_can_focus(button->widget(), FALSE);
2192 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0); 2193 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0);
2193 2194
2194 return button; 2195 return button;
2195 } 2196 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc ('k') | chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698