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

Side by Side Diff: chrome/browser/ui/gtk/task_manager_gtk.cc

Issue 7748026: content: Reapply "Start splitting up chrome/browser/ui/gtk/gtk_util.h" (r98287) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on Monday. Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
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/task_manager_gtk.h" 5 #include "chrome/browser/ui/gtk/task_manager_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 11 matching lines...) Expand all
22 #include "chrome/browser/prefs/scoped_user_pref_update.h" 22 #include "chrome/browser/prefs/scoped_user_pref_update.h"
23 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" 23 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h"
24 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 24 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
25 #include "chrome/browser/ui/gtk/gtk_tree.h" 25 #include "chrome/browser/ui/gtk/gtk_tree.h"
26 #include "chrome/browser/ui/gtk/gtk_util.h" 26 #include "chrome/browser/ui/gtk/gtk_util.h"
27 #include "chrome/common/chrome_switches.h" 27 #include "chrome/common/chrome_switches.h"
28 #include "chrome/common/pref_names.h" 28 #include "chrome/common/pref_names.h"
29 #include "grit/chromium_strings.h" 29 #include "grit/chromium_strings.h"
30 #include "grit/ui_resources.h" 30 #include "grit/ui_resources.h"
31 #include "third_party/skia/include/core/SkBitmap.h" 31 #include "third_party/skia/include/core/SkBitmap.h"
32 #include "ui/base/gtk/gtk_hig_constants.h"
32 #include "ui/base/l10n/l10n_util.h" 33 #include "ui/base/l10n/l10n_util.h"
33 #include "ui/base/models/simple_menu_model.h" 34 #include "ui/base/models/simple_menu_model.h"
34 #include "ui/base/resource/resource_bundle.h" 35 #include "ui/base/resource/resource_bundle.h"
35 #include "ui/gfx/gtk_util.h" 36 #include "ui/gfx/gtk_util.h"
36 37
37 #if defined(TOOLKIT_VIEWS) 38 #if defined(TOOLKIT_VIEWS)
38 #include "views/controls/menu/menu_2.h" 39 #include "views/controls/menu/menu_2.h"
39 #else 40 #else
40 #include "chrome/browser/ui/gtk/menu_gtk.h" 41 #include "chrome/browser/ui/gtk/menu_gtk.h"
41 #endif 42 #endif
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 kTaskManagerAboutMemoryLink); 492 kTaskManagerAboutMemoryLink);
492 493
493 // Setting the link widget to secondary positions the button on the left side 494 // Setting the link widget to secondary positions the button on the left side
494 // of the action area (vice versa for RTL layout). 495 // of the action area (vice versa for RTL layout).
495 gtk_button_box_set_child_secondary( 496 gtk_button_box_set_child_secondary(
496 GTK_BUTTON_BOX(GTK_DIALOG(dialog_)->action_area), link, TRUE); 497 GTK_BUTTON_BOX(GTK_DIALOG(dialog_)->action_area), link, TRUE);
497 498
498 ConnectAccelerators(); 499 ConnectAccelerators();
499 500
500 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), 501 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox),
501 gtk_util::kContentAreaSpacing); 502 ui::kContentAreaSpacing);
502 503
503 destroy_handler_id_ = g_signal_connect(dialog_, "destroy", 504 destroy_handler_id_ = g_signal_connect(dialog_, "destroy",
504 G_CALLBACK(OnDestroyThunk), this); 505 G_CALLBACK(OnDestroyThunk), this);
505 g_signal_connect(dialog_, "response", G_CALLBACK(OnResponseThunk), this); 506 g_signal_connect(dialog_, "response", G_CALLBACK(OnResponseThunk), this);
506 // GTK does menu on mouse-up while views does menu on mouse-down, 507 // GTK does menu on mouse-up while views does menu on mouse-down,
507 // so connect to different handlers. 508 // so connect to different handlers.
508 #if defined(TOOLKIT_VIEWS) 509 #if defined(TOOLKIT_VIEWS)
509 g_signal_connect(dialog_, "button-release-event", 510 g_signal_connect(dialog_, "button-release-event",
510 G_CALLBACK(OnButtonEventThunk), this); 511 G_CALLBACK(OnButtonEventThunk), this);
511 #else 512 #else
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 guint keyval, 1013 guint keyval,
1013 GdkModifierType modifier) { 1014 GdkModifierType modifier) {
1014 if (keyval == GDK_w && modifier == GDK_CONTROL_MASK) { 1015 if (keyval == GDK_w && modifier == GDK_CONTROL_MASK) {
1015 // The GTK_RESPONSE_DELETE_EVENT response must be sent before the widget 1016 // The GTK_RESPONSE_DELETE_EVENT response must be sent before the widget
1016 // is destroyed. The deleted object will receive gtk signals otherwise. 1017 // is destroyed. The deleted object will receive gtk signals otherwise.
1017 gtk_dialog_response(GTK_DIALOG(dialog_), GTK_RESPONSE_DELETE_EVENT); 1018 gtk_dialog_response(GTK_DIALOG(dialog_), GTK_RESPONSE_DELETE_EVENT);
1018 } 1019 }
1019 1020
1020 return TRUE; 1021 return TRUE;
1021 } 1022 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/status_bubble_gtk.cc ('k') | chrome/browser/ui/gtk/theme_install_bubble_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698