| 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/tab_gtk.h" | 5 #include "chrome/browser/gtk/tabs/tab_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 | 8 |
| 9 #include "app/gtk_dnd_util.h" | 9 #include "app/gtk_dnd_util.h" |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 gtk_widget_hide(event_box_); | 313 gtk_widget_hide(event_box_); |
| 314 } | 314 } |
| 315 } | 315 } |
| 316 | 316 |
| 317 void TabGtk::CloseButtonClicked() { | 317 void TabGtk::CloseButtonClicked() { |
| 318 delegate_->CloseTab(this); | 318 delegate_->CloseTab(this); |
| 319 } | 319 } |
| 320 | 320 |
| 321 void TabGtk::UpdateData(TabContents* contents, | 321 void TabGtk::UpdateData(TabContents* contents, |
| 322 bool phantom, | 322 bool phantom, |
| 323 bool app, |
| 323 bool loading_only) { | 324 bool loading_only) { |
| 324 TabRendererGtk::UpdateData(contents, phantom, loading_only); | 325 TabRendererGtk::UpdateData(contents, phantom, app, loading_only); |
| 325 // Cache the title width so we don't recalculate it every time the tab is | 326 // Cache the title width so we don't recalculate it every time the tab is |
| 326 // resized. | 327 // resized. |
| 327 title_width_ = GetTitleWidth(title_font(), GetTitle()); | 328 title_width_ = GetTitleWidth(title_font(), GetTitle()); |
| 328 UpdateTooltipState(); | 329 UpdateTooltipState(); |
| 329 } | 330 } |
| 330 | 331 |
| 331 void TabGtk::SetBounds(const gfx::Rect& bounds) { | 332 void TabGtk::SetBounds(const gfx::Rect& bounds) { |
| 332 TabRendererGtk::SetBounds(bounds); | 333 TabRendererGtk::SetBounds(bounds); |
| 333 UpdateTooltipState(); | 334 UpdateTooltipState(); |
| 334 } | 335 } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 gdk_event_free(last_mouse_down_); | 402 gdk_event_free(last_mouse_down_); |
| 402 last_mouse_down_ = NULL; | 403 last_mouse_down_ = NULL; |
| 403 } | 404 } |
| 404 | 405 |
| 405 // Notify the drag helper that we're done with any potential drag operations. | 406 // Notify the drag helper that we're done with any potential drag operations. |
| 406 // Clean up the drag helper, which is re-created on the next mouse press. | 407 // Clean up the drag helper, which is re-created on the next mouse press. |
| 407 delegate_->EndDrag(canceled); | 408 delegate_->EndDrag(canceled); |
| 408 | 409 |
| 409 observer_.reset(); | 410 observer_.reset(); |
| 410 } | 411 } |
| OLD | NEW |