OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/gtk/tabs/dragged_tab_gtk.h" | 5 #include "chrome/browser/gtk/tabs/dragged_tab_gtk.h" |
6 | 6 |
7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
11 #include "app/gfx/canvas_paint.h" | |
12 #include "app/x11_util.h" | 11 #include "app/x11_util.h" |
13 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
14 #include "chrome/browser/browser_theme_provider.h" | 13 #include "chrome/browser/browser_theme_provider.h" |
15 #include "chrome/browser/gtk/gtk_util.h" | 14 #include "chrome/browser/gtk/gtk_util.h" |
16 #include "chrome/browser/gtk/tabs/tab_renderer_gtk.h" | 15 #include "chrome/browser/gtk/tabs/tab_renderer_gtk.h" |
17 #include "chrome/browser/profile.h" | 16 #include "chrome/browser/profile.h" |
18 #include "chrome/browser/renderer_host/backing_store_x.h" | 17 #include "chrome/browser/renderer_host/backing_store_x.h" |
19 #include "chrome/browser/renderer_host/render_view_host.h" | 18 #include "chrome/browser/renderer_host/render_view_host.h" |
20 #include "chrome/browser/tab_contents/tab_contents.h" | 19 #include "chrome/browser/tab_contents/tab_contents.h" |
21 #include "chrome/browser/tabs/tab_strip_model.h" | 20 #include "chrome/browser/tabs/tab_strip_model.h" |
| 21 #include "gfx/canvas_paint.h" |
22 #include "gfx/gtk_util.h" | 22 #include "gfx/gtk_util.h" |
23 #include "third_party/skia/include/core/SkShader.h" | 23 #include "third_party/skia/include/core/SkShader.h" |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 // The size of the dragged window frame. | 27 // The size of the dragged window frame. |
28 const int kDragFrameBorderSize = 1; | 28 const int kDragFrameBorderSize = 1; |
29 const int kTwiceDragFrameBorderSize = 2 * kDragFrameBorderSize; | 29 const int kTwiceDragFrameBorderSize = 2 * kDragFrameBorderSize; |
30 | 30 |
31 // Used to scale the dragged window sizes. | 31 // Used to scale the dragged window sizes. |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 cairo_set_source_surface(cr, surface, 0, 0); | 327 cairo_set_source_surface(cr, surface, 0, 0); |
328 cairo_paint(cr); | 328 cairo_paint(cr); |
329 | 329 |
330 cairo_destroy(cr); | 330 cairo_destroy(cr); |
331 | 331 |
332 cairo_surface_destroy(surface); | 332 cairo_surface_destroy(surface); |
333 | 333 |
334 // We've already drawn the tab, so don't propagate the expose-event signal. | 334 // We've already drawn the tab, so don't propagate the expose-event signal. |
335 return TRUE; | 335 return TRUE; |
336 } | 336 } |
OLD | NEW |