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

Side by Side Diff: chrome/browser/gtk/view_id_util.h

Issue 210019: GTK: Add a bunch more widget names for parasite.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: comments Created 11 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
« no previous file with comments | « chrome/browser/gtk/gtk_chrome_link_button.cc ('k') | chrome/browser/gtk/view_id_util.cc » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_GTK_VIEW_ID_UTIL_H_ 5 #ifndef CHROME_BROWSER_GTK_VIEW_ID_UTIL_H_
6 #define CHROME_BROWSER_GTK_VIEW_ID_UTIL_H_ 6 #define CHROME_BROWSER_GTK_VIEW_ID_UTIL_H_
7 7
8 #include "chrome/browser/view_ids.h" 8 #include "chrome/browser/view_ids.h"
9 9
10 typedef struct _GtkWidget GtkWidget; 10 typedef struct _GtkWidget GtkWidget;
11 11
12 class ViewIDUtil { 12 class ViewIDUtil {
13 public: 13 public:
14 // Use this delegate to override default view id searches. 14 // Use this delegate to override default view id searches.
15 class Delegate { 15 class Delegate {
16 public: 16 public:
17 virtual GtkWidget* GetWidgetForViewID(ViewID id) = 0; 17 virtual GtkWidget* GetWidgetForViewID(ViewID id) = 0;
18 }; 18 };
19 19
20 // If you set the ID via this function, it will also set the name of your
21 // widget to a human-readable value for debugging.
20 static void SetID(GtkWidget* widget, ViewID id); 22 static void SetID(GtkWidget* widget, ViewID id);
21 23
22 static GtkWidget* GetWidget(GtkWidget* root, ViewID id); 24 static GtkWidget* GetWidget(GtkWidget* root, ViewID id);
23 25
24 static void SetDelegateForWidget(GtkWidget* widget, Delegate* delegate); 26 static void SetDelegateForWidget(GtkWidget* widget, Delegate* delegate);
25 }; 27 };
26 28
27 #endif // CHROME_BROWSER_GTK_VIEW_ID_UTIL_H_ 29 #endif // CHROME_BROWSER_GTK_VIEW_ID_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/gtk/gtk_chrome_link_button.cc ('k') | chrome/browser/gtk/view_id_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698