summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-23 21:29:42 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-23 21:29:42 +0000
commit4e78ee1663d14ef7a087cefbd644652e53b9bdcb (patch)
treec66e573df7b9fc04d329fa2709f8800c35166cf8
parent9ddbcd95dd5c1e38a3b38cfc0c8c913a7610a8b9 (diff)
downloadchromium_src-4e78ee1663d14ef7a087cefbd644652e53b9bdcb.zip
chromium_src-4e78ee1663d14ef7a087cefbd644652e53b9bdcb.tar.gz
chromium_src-4e78ee1663d14ef7a087cefbd644652e53b9bdcb.tar.bz2
Add more view ids and gtk widget names to so gtkparasite is
easier to navigate. Review URL: http://codereview.chromium.org/221001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26992 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/gtk/browser_titlebar.cc1
-rw-r--r--chrome/browser/gtk/browser_window_gtk.cc2
-rw-r--r--chrome/browser/gtk/extension_shelf_gtk.cc2
-rw-r--r--chrome/browser/gtk/find_bar_gtk.cc1
-rw-r--r--chrome/browser/gtk/tabs/tab_strip_gtk.cc1
-rw-r--r--chrome/browser/gtk/view_id_util.cc12
-rw-r--r--chrome/browser/renderer_host/render_widget_host.cc2
-rw-r--r--chrome/browser/view_ids.h9
-rw-r--r--chrome/browser/views/extensions/extension_shelf.cc2
-rw-r--r--chrome/browser/views/find_bar_view.cc1
-rw-r--r--chrome/browser/views/frame/browser_view.cc1
-rw-r--r--chrome/browser/views/tabs/tab_strip.cc1
12 files changed, 34 insertions, 1 deletions
diff --git a/chrome/browser/gtk/browser_titlebar.cc b/chrome/browser/gtk/browser_titlebar.cc
index cc72cf6..fe85dbb 100644
--- a/chrome/browser/gtk/browser_titlebar.cc
+++ b/chrome/browser/gtk/browser_titlebar.cc
@@ -163,6 +163,7 @@ void BrowserTitlebar::Init() {
GtkWidget* container_hbox = gtk_hbox_new(FALSE, 0);
container_ = gtk_event_box_new();
+ gtk_widget_set_name(container_, "chrome-browser-titlebar");
gtk_event_box_set_visible_window(GTK_EVENT_BOX(container_), FALSE);
gtk_container_add(GTK_CONTAINER(container_), container_hbox);
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index aec56c2..8b2dae5 100644
--- a/chrome/browser/gtk/browser_window_gtk.cc
+++ b/chrome/browser/gtk/browser_window_gtk.cc
@@ -1535,6 +1535,7 @@ void BrowserWindowGtk::InitWidgets() {
// The window container draws the custom browser frame.
window_container_ = gtk_alignment_new(0.0, 0.0, 1.0, 1.0);
+ gtk_widget_set_name(window_container_, "chrome-custom-frame-border");
gtk_widget_set_app_paintable(window_container_, TRUE);
gtk_widget_set_double_buffered(window_container_, FALSE);
gtk_widget_set_redraw_on_allocate(window_container_, TRUE);
@@ -1646,6 +1647,7 @@ void BrowserWindowGtk::InitWidgets() {
contents_container_.reset(new TabContentsContainerGtk(status_bubble_.get()));
devtools_container_.reset(new TabContentsContainerGtk(NULL));
+ ViewIDUtil::SetID(devtools_container_->widget(), VIEW_ID_DEV_TOOLS_DOCKED);
contents_split_ = gtk_vpaned_new();
gtk_paned_pack1(GTK_PANED(contents_split_), contents_container_->widget(),
TRUE, TRUE);
diff --git a/chrome/browser/gtk/extension_shelf_gtk.cc b/chrome/browser/gtk/extension_shelf_gtk.cc
index 0383dcc..d16d2b2 100644
--- a/chrome/browser/gtk/extension_shelf_gtk.cc
+++ b/chrome/browser/gtk/extension_shelf_gtk.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/browser.h"
#include "chrome/browser/gtk/browser_window_gtk.h"
#include "chrome/browser/gtk/gtk_theme_provider.h"
+#include "chrome/browser/gtk/view_id_util.h"
#include "chrome/browser/profile.h"
#include "chrome/common/notification_service.h"
#include "grit/app_resources.h"
@@ -176,6 +177,7 @@ void ExtensionShelfGtk::Init(Profile* profile) {
// The event box provides a background for the shelf and is its top-level
// widget.
event_box_.Own(gtk_event_box_new());
+ ViewIDUtil::SetID(event_box_.get(), VIEW_ID_DEV_EXTENSION_SHELF);
gtk_widget_modify_bg(event_box_.get(), GTK_STATE_NORMAL, &kBackgroundColor);
shelf_hbox_ = gtk_hbox_new(FALSE, 0);
diff --git a/chrome/browser/gtk/find_bar_gtk.cc b/chrome/browser/gtk/find_bar_gtk.cc
index 077d723..19d8a46 100644
--- a/chrome/browser/gtk/find_bar_gtk.cc
+++ b/chrome/browser/gtk/find_bar_gtk.cc
@@ -212,6 +212,7 @@ void FindBarGtk::InitWidgets() {
container_ = gtk_util::CreateGtkBorderBin(hbox, NULL,
kBarPaddingTopBottom, kBarPaddingTopBottom,
kEntryPaddingLeft, kBarPaddingRight);
+ ViewIDUtil::SetID(container_, VIEW_ID_FIND_IN_PAGE);
gtk_widget_set_app_paintable(container_, TRUE);
slide_widget_.reset(new SlideAnimatorGtk(container_,
diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
index 60e2d20..1c05649 100644
--- a/chrome/browser/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
@@ -710,6 +710,7 @@ void TabStripGtk::Init() {
model_->AddObserver(this);
tabstrip_.Own(gtk_fixed_new());
+ ViewIDUtil::SetID(tabstrip_.get(), VIEW_ID_TAB_STRIP);
gtk_widget_set_size_request(tabstrip_.get(), -1,
TabGtk::GetMinimumUnselectedSize().height());
gtk_widget_set_app_paintable(tabstrip_.get(), TRUE);
diff --git a/chrome/browser/gtk/view_id_util.cc b/chrome/browser/gtk/view_id_util.cc
index 9a8a875..264c91a 100644
--- a/chrome/browser/gtk/view_id_util.cc
+++ b/chrome/browser/gtk/view_id_util.cc
@@ -59,6 +59,9 @@ void SearchForWidgetWithViewID(GtkWidget* widget, gpointer data) {
const char* GetNameFromID(ViewID id) {
switch (id) {
+ case VIEW_ID_TAB_STRIP:
+ return "chrome-tab-strip";
+
case VIEW_ID_TOOLBAR:
return "chrome-toolbar";
@@ -101,6 +104,15 @@ const char* GetNameFromID(ViewID id) {
case VIEW_ID_FIND_IN_PAGE_TEXT_FIELD:
return "chrome-find-in-page-entry";
+ case VIEW_ID_FIND_IN_PAGE:
+ return "chrome-find-in-page";
+
+ case VIEW_ID_DEV_TOOLS_DOCKED:
+ return "chrome-dev-tools-docked";
+
+ case VIEW_ID_DEV_EXTENSION_SHELF:
+ return "chrome-extension-shelf";
+
// These are never hit because the tab container uses the delegate to
// set its ID.
case VIEW_ID_TAB_CONTAINER:
diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc
index 2bdf11c..d9971ec 100644
--- a/chrome/browser/renderer_host/render_widget_host.cc
+++ b/chrome/browser/renderer_host/render_widget_host.cc
@@ -637,7 +637,7 @@ void RenderWidgetHost::OnMsgPaintRect(
// We don't need to update the view if the view is hidden. We must do this
// early return after the ACK is sent, however, or the renderer will not send
- // is more data.
+ // us more data.
if (is_hidden_)
return;
diff --git a/chrome/browser/view_ids.h b/chrome/browser/view_ids.h
index 92561de..29787ac 100644
--- a/chrome/browser/view_ids.h
+++ b/chrome/browser/view_ids.h
@@ -27,6 +27,8 @@ enum ViewID {
VIEW_ID_TAB_9,
VIEW_ID_TAB_LAST,
+ VIEW_ID_TAB_STRIP,
+
// Toolbar & toolbar elements.
VIEW_ID_TOOLBAR = 1000,
VIEW_ID_BACK_BUTTON,
@@ -46,11 +48,18 @@ enum ViewID {
// Find in page.
VIEW_ID_FIND_IN_PAGE_TEXT_FIELD,
+ VIEW_ID_FIND_IN_PAGE,
// Tab Container window.
VIEW_ID_TAB_CONTAINER,
VIEW_ID_TAB_CONTAINER_FOCUS_VIEW,
+ // Docked dev tools.
+ VIEW_ID_DEV_TOOLS_DOCKED,
+
+ // Bottom extension shelf.
+ VIEW_ID_DEV_EXTENSION_SHELF,
+
VIEW_ID_PREDEFINED_COUNT
};
diff --git a/chrome/browser/views/extensions/extension_shelf.cc b/chrome/browser/views/extensions/extension_shelf.cc
index 797654f..0b9ae7c 100644
--- a/chrome/browser/views/extensions/extension_shelf.cc
+++ b/chrome/browser/views/extensions/extension_shelf.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/views/extensions/extension_view.h"
+#include "chrome/browser/view_ids.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/notification_service.h"
@@ -683,6 +684,7 @@ ExtensionShelf::ExtensionShelf(Browser* browser)
browser_(browser),
model_(browser->extension_shelf_model()),
fullscreen_(false) {
+ SetID(VIEW_ID_DEV_EXTENSION_SHELF);
model_->AddObserver(this);
LoadFromModel();
EnableCanvasFlippingForRTLUI(true);
diff --git a/chrome/browser/views/find_bar_view.cc b/chrome/browser/views/find_bar_view.cc
index bd7e0bb..af44846 100644
--- a/chrome/browser/views/find_bar_view.cc
+++ b/chrome/browser/views/find_bar_view.cc
@@ -85,6 +85,7 @@ FindBarView::FindBarView(FindBarHost* container)
find_next_button_(NULL),
close_button_(NULL),
animation_offset_(0) {
+ SetID(VIEW_ID_FIND_IN_PAGE);
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
find_text_ = new views::Textfield();
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index 0894d9c..1d38ef6 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -1630,6 +1630,7 @@ void BrowserView::Init() {
contents_container_ = new TabContentsContainer;
devtools_container_ = new TabContentsContainer;
+ devtools_container_->SetID(VIEW_ID_DEV_TOOLS_DOCKED);
devtools_container_->SetVisible(false);
contents_split_ = new views::SingleSplitView(
contents_container_,
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc
index cfc62a3..896b3d6 100644
--- a/chrome/browser/views/tabs/tab_strip.cc
+++ b/chrome/browser/views/tabs/tab_strip.cc
@@ -1364,6 +1364,7 @@ TabStrip* TabStrip::AsTabStrip() {
// TabStrip, private:
void TabStrip::Init() {
+ SetID(VIEW_ID_TAB_STRIP);
model_->AddObserver(this);
newtab_button_size_.SetSize(kNewTabButtonWidth, kNewTabButtonHeight);
if (drop_indicator_width == 0) {