| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_gtk.h" | 5 #include "chrome/browser/ui/gtk/tabs/tab_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| 11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "chrome/app/chrome_command_ids.h" | 13 #include "chrome/app/chrome_command_ids.h" |
| 14 #include "chrome/browser/ui/gtk/accelerators_gtk.h" | 14 #include "chrome/browser/ui/gtk/accelerators_gtk.h" |
| 15 #include "chrome/browser/ui/gtk/gtk_input_event_box.h" | 15 #include "chrome/browser/ui/gtk/gtk_input_event_box.h" |
| 16 #include "chrome/browser/ui/gtk/menu_gtk.h" | 16 #include "chrome/browser/ui/gtk/menu_gtk.h" |
| 17 #include "chrome/browser/ui/gtk/tabs/tab_strip_menu_controller.h" | 17 #include "chrome/browser/ui/gtk/tabs/tab_strip_menu_controller.h" |
| 18 #include "chrome/browser/ui/tabs/tab_menu_model.h" | 18 #include "chrome/browser/ui/tabs/tab_menu_model.h" |
| 19 #include "chrome/browser/ui/tabs/tab_resources.h" | 19 #include "chrome/browser/ui/tabs/tab_resources.h" |
| 20 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
| 21 #include "grit/theme_resources.h" | 21 #include "grit/theme_resources.h" |
| 22 #include "ui/base/accelerators/accelerator_gtk.h" | 22 #include "ui/base/accelerators/accelerator_gtk.h" |
| 23 #include "ui/base/dragdrop/gtk_dnd_util.h" | 23 #include "ui/base/dragdrop/gtk_dnd_util.h" |
| 24 #include "ui/base/gtk/scoped_handle_gtk.h" | 24 #include "ui/base/gtk/scoped_region.h" |
| 25 #include "ui/gfx/path.h" | 25 #include "ui/gfx/path.h" |
| 26 | 26 |
| 27 using content::WebContents; | 27 using content::WebContents; |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 // Returns the width of the title for the current font, in pixels. | 31 // Returns the width of the title for the current font, in pixels. |
| 32 int GetTitleWidth(gfx::Font* font, string16 title) { | 32 int GetTitleWidth(gfx::Font* font, string16 title) { |
| 33 DCHECK(font); | 33 DCHECK(font); |
| 34 if (title.empty()) | 34 if (title.empty()) |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 gdk_event_free(last_mouse_down_); | 353 gdk_event_free(last_mouse_down_); |
| 354 last_mouse_down_ = NULL; | 354 last_mouse_down_ = NULL; |
| 355 } | 355 } |
| 356 | 356 |
| 357 // Notify the drag helper that we're done with any potential drag operations. | 357 // Notify the drag helper that we're done with any potential drag operations. |
| 358 // Clean up the drag helper, which is re-created on the next mouse press. | 358 // Clean up the drag helper, which is re-created on the next mouse press. |
| 359 delegate_->EndDrag(canceled); | 359 delegate_->EndDrag(canceled); |
| 360 | 360 |
| 361 observer_.reset(); | 361 observer_.reset(); |
| 362 } | 362 } |
| OLD | NEW |