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 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 const gfx::Point& mouse_tab_offset, | 47 const gfx::Point& mouse_tab_offset, |
48 const gfx::Size& contents_size, | 48 const gfx::Size& contents_size, |
49 bool mini) | 49 bool mini) |
50 : data_source_(datasource), | 50 : data_source_(datasource), |
51 renderer_(new TabRendererGtk(datasource->profile()->GetThemeProvider())), | 51 renderer_(new TabRendererGtk(datasource->profile()->GetThemeProvider())), |
52 attached_(false), | 52 attached_(false), |
53 mouse_tab_offset_(mouse_tab_offset), | 53 mouse_tab_offset_(mouse_tab_offset), |
54 attached_tab_size_(TabRendererGtk::GetMinimumSelectedSize()), | 54 attached_tab_size_(TabRendererGtk::GetMinimumSelectedSize()), |
55 contents_size_(contents_size), | 55 contents_size_(contents_size), |
56 close_animation_(this) { | 56 close_animation_(this) { |
57 renderer_->UpdateData(datasource, false, false); | 57 renderer_->UpdateData(datasource, |
| 58 false, // phantom |
| 59 datasource->is_app(), |
| 60 false); // loading_only |
58 renderer_->set_mini(mini); | 61 renderer_->set_mini(mini); |
59 | 62 |
60 container_ = gtk_window_new(GTK_WINDOW_POPUP); | 63 container_ = gtk_window_new(GTK_WINDOW_POPUP); |
61 SetContainerColorMap(); | 64 SetContainerColorMap(); |
62 gtk_widget_set_app_paintable(container_, TRUE); | 65 gtk_widget_set_app_paintable(container_, TRUE); |
63 g_signal_connect(container_, "expose-event", | 66 g_signal_connect(container_, "expose-event", |
64 G_CALLBACK(OnExposeEvent), this); | 67 G_CALLBACK(OnExposeEvent), this); |
65 gtk_widget_add_events(container_, GDK_STRUCTURE_MASK); | 68 gtk_widget_add_events(container_, GDK_STRUCTURE_MASK); |
66 | 69 |
67 // We contain the tab renderer in a GtkFixed in order to maintain the | 70 // We contain the tab renderer in a GtkFixed in order to maintain the |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 cairo_set_source_surface(cr, surface, 0, 0); | 328 cairo_set_source_surface(cr, surface, 0, 0); |
326 cairo_paint(cr); | 329 cairo_paint(cr); |
327 | 330 |
328 cairo_destroy(cr); | 331 cairo_destroy(cr); |
329 | 332 |
330 cairo_surface_destroy(surface); | 333 cairo_surface_destroy(surface); |
331 | 334 |
332 // We've already drawn the tab, so don't propagate the expose-event signal. | 335 // We've already drawn the tab, so don't propagate the expose-event signal. |
333 return TRUE; | 336 return TRUE; |
334 } | 337 } |
OLD | NEW |