| OLD | NEW |
| 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/view_id_util.h" | 5 #include "chrome/browser/gtk/view_id_util.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include <gtk/gtk.h> | 10 #include <gtk/gtk.h> |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 case VIEW_ID_FIND_IN_PAGE_TEXT_FIELD: | 101 case VIEW_ID_FIND_IN_PAGE_TEXT_FIELD: |
| 102 return "chrome-find-in-page-entry"; | 102 return "chrome-find-in-page-entry"; |
| 103 | 103 |
| 104 case VIEW_ID_FIND_IN_PAGE: | 104 case VIEW_ID_FIND_IN_PAGE: |
| 105 return "chrome-find-in-page"; | 105 return "chrome-find-in-page"; |
| 106 | 106 |
| 107 case VIEW_ID_DEV_TOOLS_DOCKED: | 107 case VIEW_ID_DEV_TOOLS_DOCKED: |
| 108 return "chrome-dev-tools-docked"; | 108 return "chrome-dev-tools-docked"; |
| 109 | 109 |
| 110 case VIEW_ID_DEV_EXTENSION_SHELF: | |
| 111 return "chrome-extension-shelf"; | |
| 112 | |
| 113 // These are never hit because the tab container uses the delegate to | 110 // These are never hit because the tab container uses the delegate to |
| 114 // set its ID. | 111 // set its ID. |
| 115 case VIEW_ID_TAB_CONTAINER: | 112 case VIEW_ID_TAB_CONTAINER: |
| 116 case VIEW_ID_TAB_CONTAINER_FOCUS_VIEW: | 113 case VIEW_ID_TAB_CONTAINER_FOCUS_VIEW: |
| 117 default: | 114 default: |
| 118 NOTREACHED() << "If you added a new VIEW_ID, please provide " | 115 NOTREACHED() << "If you added a new VIEW_ID, please provide " |
| 119 "a name for the widget."; | 116 "a name for the widget."; |
| 120 return NULL; | 117 return NULL; |
| 121 } | 118 } |
| 122 } | 119 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 133 | 130 |
| 134 GtkWidget* ViewIDUtil::GetWidget(GtkWidget* root, ViewID id) { | 131 GtkWidget* ViewIDUtil::GetWidget(GtkWidget* root, ViewID id) { |
| 135 ViewIDSearchStruct search_struct = { id, NULL }; | 132 ViewIDSearchStruct search_struct = { id, NULL }; |
| 136 SearchForWidgetWithViewID(root, &search_struct); | 133 SearchForWidgetWithViewID(root, &search_struct); |
| 137 return search_struct.widget; | 134 return search_struct.widget; |
| 138 } | 135 } |
| 139 | 136 |
| 140 void ViewIDUtil::SetDelegateForWidget(GtkWidget* widget, Delegate* delegate) { | 137 void ViewIDUtil::SetDelegateForWidget(GtkWidget* widget, Delegate* delegate) { |
| 141 g_object_set_data(G_OBJECT(widget), kViewIDOverrideString, delegate); | 138 g_object_set_data(G_OBJECT(widget), kViewIDOverrideString, delegate); |
| 142 } | 139 } |
| OLD | NEW |