Status: Assigned Owner: est...@chromium.org Labels: Type-Bug Pri-2 OS-Linux Area-BrowserBackend Size-Small
New issue 19214 by est...@chromium.org: Need GetViewByID equivalent on linux http://code.google.com/p/chromium/issues/detail?id=19214 On windows, there is an enum in chrome/browser/view_ids.h: enum ViewID { VIEW_ID_NONE = 0, // BROWSER WINDOW VIEWS // ------------------------------------------------------ // Tabs within a window/tab strip, counting from the left. VIEW_ID_TAB_0, VIEW_ID_TAB_1, VIEW_ID_TAB_2, VIEW_ID_TAB_3, VIEW_ID_TAB_4, VIEW_ID_TAB_5, VIEW_ID_TAB_6, VIEW_ID_TAB_7, VIEW_ID_TAB_8, VIEW_ID_TAB_9, VIEW_ID_TAB_LAST, // Toolbar & toolbar elements. VIEW_ID_TOOLBAR = 1000, VIEW_ID_BACK_BUTTON, VIEW_ID_FORWARD_BUTTON, VIEW_ID_RELOAD_BUTTON, VIEW_ID_HOME_BUTTON, VIEW_ID_STAR_BUTTON, VIEW_ID_LOCATION_BAR, VIEW_ID_GO_BUTTON, VIEW_ID_PAGE_MENU, VIEW_ID_APP_MENU, VIEW_ID_AUTOCOMPLETE, VIEW_ID_BOOKMARK_MENU, // The Bookmark Bar. VIEW_ID_BOOKMARK_BAR, // Find in page. VIEW_ID_FIND_IN_PAGE_TEXT_FIELD, // Tab Container window. VIEW_ID_TAB_CONTAINER, VIEW_ID_PREDEFINED_COUNT }; The correct ID is set on each view (either at creation time or at some other point). So for example you can get a handle back to the bookmark bar by calling View::GetViewByID(VIEW_ID_BOOKMARK_BAR) on the browser view. (It just does a DFS on the view IDs.) This is needed for automation tests. We need to do something similar. Should be pretty easy to g_object_set_data(widget, "__VIEW_ID__", VIEW_ID_DEFINE) on the widgets we care about. Having written this all out it strikes me that this will be pretty easy and probably did not warrant its own bug. oh well too late! -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ Automated mail from issue updates at http://crbug.com/ Subscription options: http://groups.google.com/group/chromium-bugs -~----------~----~----~----~------~----~------~--~---