OLD | NEW |
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_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/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/app/chrome_command_ids.h" | 12 #include "chrome/app/chrome_command_ids.h" |
13 #include "chrome/browser/ui/gtk/accelerators_gtk.h" | 13 #include "chrome/browser/ui/gtk/accelerators_gtk.h" |
14 #include "chrome/browser/ui/gtk/gtk_input_event_box.h" | 14 #include "chrome/browser/ui/gtk/gtk_input_event_box.h" |
15 #include "chrome/browser/ui/gtk/menu_gtk.h" | 15 #include "chrome/browser/ui/gtk/menu_gtk.h" |
16 #include "chrome/browser/ui/gtk/tabs/tab_strip_menu_controller.h" | 16 #include "chrome/browser/ui/gtk/tabs/tab_strip_menu_controller.h" |
17 #include "chrome/browser/ui/tabs/tab_menu_model.h" | 17 #include "chrome/browser/ui/tabs/tab_menu_model.h" |
18 #include "chrome/browser/ui/tabs/tab_resources.h" | 18 #include "chrome/browser/ui/tabs/tab_resources.h" |
19 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
20 #include "grit/theme_resources.h" | 20 #include "grit/theme_resources.h" |
| 21 #include "ui/base/accelerators/accelerator_gtk.h" |
21 #include "ui/base/dragdrop/gtk_dnd_util.h" | 22 #include "ui/base/dragdrop/gtk_dnd_util.h" |
22 #include "ui/base/gtk/scoped_handle_gtk.h" | 23 #include "ui/base/gtk/scoped_handle_gtk.h" |
23 #include "ui/base/models/accelerator_gtk.h" | |
24 #include "ui/gfx/path.h" | 24 #include "ui/gfx/path.h" |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 // Returns the width of the title for the current font, in pixels. | 28 // Returns the width of the title for the current font, in pixels. |
29 int GetTitleWidth(gfx::Font* font, string16 title) { | 29 int GetTitleWidth(gfx::Font* font, string16 title) { |
30 DCHECK(font); | 30 DCHECK(font); |
31 if (title.empty()) | 31 if (title.empty()) |
32 return 0; | 32 return 0; |
33 | 33 |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 gdk_event_free(last_mouse_down_); | 345 gdk_event_free(last_mouse_down_); |
346 last_mouse_down_ = NULL; | 346 last_mouse_down_ = NULL; |
347 } | 347 } |
348 | 348 |
349 // Notify the drag helper that we're done with any potential drag operations. | 349 // Notify the drag helper that we're done with any potential drag operations. |
350 // Clean up the drag helper, which is re-created on the next mouse press. | 350 // Clean up the drag helper, which is re-created on the next mouse press. |
351 delegate_->EndDrag(canceled); | 351 delegate_->EndDrag(canceled); |
352 | 352 |
353 observer_.reset(); | 353 observer_.reset(); |
354 } | 354 } |
OLD | NEW |