Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: chrome/browser/gtk/tabs/tab_gtk.cc

Issue 3056003: Attemp 2 at: (Closed)
Patch Set: Fix chromeos breakage Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/gtk/location_bar_view_gtk.h ('k') | chrome/browser/location_bar.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 20 matching lines...) Expand all
31 31
32 return font->GetStringWidth(title); 32 return font->GetStringWidth(title);
33 } 33 }
34 34
35 } // namespace 35 } // namespace
36 36
37 class TabGtk::ContextMenuController : public menus::SimpleMenuModel::Delegate { 37 class TabGtk::ContextMenuController : public menus::SimpleMenuModel::Delegate {
38 public: 38 public:
39 explicit ContextMenuController(TabGtk* tab) 39 explicit ContextMenuController(TabGtk* tab)
40 : tab_(tab), 40 : tab_(tab),
41 model_(this, tab->delegate()->IsTabPinned(tab), false, true) { 41 model_(this, tab->delegate()->IsTabPinned(tab)) {
42 menu_.reset(new MenuGtk(NULL, &model_)); 42 menu_.reset(new MenuGtk(NULL, &model_));
43 } 43 }
44 44
45 virtual ~ContextMenuController() {} 45 virtual ~ContextMenuController() {}
46 46
47 void RunMenu() { 47 void RunMenu() {
48 menu_->PopupAsContext(gtk_get_current_event_time()); 48 menu_->PopupAsContext(gtk_get_current_event_time());
49 } 49 }
50 50
51 void Cancel() { 51 void Cancel() {
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 gdk_event_free(last_mouse_down_); 402 gdk_event_free(last_mouse_down_);
403 last_mouse_down_ = NULL; 403 last_mouse_down_ = NULL;
404 } 404 }
405 405
406 // 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.
407 // 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.
408 delegate_->EndDrag(canceled); 408 delegate_->EndDrag(canceled);
409 409
410 observer_.reset(); 410 observer_.reset();
411 } 411 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/location_bar_view_gtk.h ('k') | chrome/browser/location_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698