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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_GTK_VIEW_ID_UTIL_H_
6 #define CHROME_BROWSER_UI_GTK_VIEW_ID_UTIL_H_
8 #include "chrome/browser/ui/view_ids.h"
10 typedef struct _GtkWidget GtkWidget
;
14 // Use this delegate to override default view id searches.
17 virtual GtkWidget
* GetWidgetForViewID(ViewID id
) = 0;
20 virtual ~Delegate() {}
23 // If you set the ID via this function, it will also set the name of your
24 // widget to a human-readable value for debugging.
25 static void SetID(GtkWidget
* widget
, ViewID id
);
27 static GtkWidget
* GetWidget(GtkWidget
* root
, ViewID id
);
29 static void SetDelegateForWidget(GtkWidget
* widget
, Delegate
* delegate
);
32 #endif // CHROME_BROWSER_UI_GTK_VIEW_ID_UTIL_H_