summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/theme/help_16.pngbin0 -> 1175 bytes
-rw-r--r--chrome/app/theme/theme_resources.grd1
-rw-r--r--chrome/browser/resources/help_app/manifest.json7
-rw-r--r--chrome/browser/ui/toolbar/wrench_menu_model.cc14
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc43
-rw-r--r--chrome/browser/ui/views/toolbar_view.h3
6 files changed, 15 insertions, 53 deletions
diff --git a/chrome/app/theme/help_16.png b/chrome/app/theme/help_16.png
new file mode 100644
index 0000000..f8de3ea
--- /dev/null
+++ b/chrome/app/theme/help_16.png
Binary files differ
diff --git a/chrome/app/theme/theme_resources.grd b/chrome/app/theme/theme_resources.grd
index 813b133..09dedf6 100644
--- a/chrome/app/theme/theme_resources.grd
+++ b/chrome/app/theme/theme_resources.grd
@@ -705,6 +705,7 @@
<include name="IDR_DROPDOWN_TOP_P" file="textbutton_dropdown_t_p.png" type="BINDATA" />
<include name="IDR_DROPDOWN_TOP_RIGHT_H" file="textbutton_dropdown_tr_h.png" type="BINDATA" />
<include name="IDR_DROPDOWN_TOP_RIGHT_P" file="textbutton_dropdown_tr_p.png" type="BINDATA" />
+ <include name="IDR_HELP_MENU" file="help_16.png" type="BINDATA" />
<include name="IDR_INCOGNITO_GUY" file="incognito_guy.png" type="BINDATA" />
<include name="IDR_LOGIN_DEFAULT_USER" file="avatar_beaker.png" type="BINDATA" />
<include name="IDR_LOGIN_DEFAULT_USER_1" file="avatar_bee.png" type="BINDATA" />
diff --git a/chrome/browser/resources/help_app/manifest.json b/chrome/browser/resources/help_app/manifest.json
index d34b2a1..d8a68bf 100644
--- a/chrome/browser/resources/help_app/manifest.json
+++ b/chrome/browser/resources/help_app/manifest.json
@@ -14,10 +14,5 @@
"tabs",
"http://www.google.com/support/chromeos/*/*",
"https://www.google.com/support/chromeos/*/*"
- ],
- "browser_action": {
- "default_icon": "images/question_16b.png",
- "default_title": "Help Center",
- "default_popup": "popup.html"
- }
+ ]
}
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index 2d869c8..e2d7a58 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -176,9 +176,11 @@ void ToolsMenuModel::Build(Browser* browser) {
AddSeparator();
+#if !defined(OS_CHROMEOS)
+ // Show IDC_FEEDBACK in "Tools" menu for non-ChromeOS platforms.
AddItemWithStringId(IDC_FEEDBACK, IDS_FEEDBACK);
-
AddSeparator();
+#endif
encoding_menu_model_.reset(new EncodingMenuModel(browser));
AddSubMenuWithStringId(IDC_ENCODING_MENU, IDS_ENCODING_MENU,
@@ -494,6 +496,16 @@ void WrenchMenuModel::Build() {
#endif
AddItemWithStringId(IDC_HELP_PAGE, IDS_HELP_PAGE);
+#if defined(OS_CHROMEOS)
+ ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ // Use an icon for IDC_HELP_PAGE menu item.
+ SetIcon(GetIndexOfCommandId(IDC_HELP_PAGE),
+ *rb.GetBitmapNamed(IDR_HELP_MENU));
+
+ // Show IDC_FEEDBACK in top-tier wrench menu for ChromeOS.
+ AddItemWithStringId(IDC_FEEDBACK, IDS_FEEDBACK);
+#endif
+
if (browser_defaults::kShowExitMenuItem) {
AddSeparator();
#if defined(OS_CHROMEOS)
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index 7c28752..5e8e136 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -85,9 +85,6 @@ ToolbarView::ToolbarView(Browser* browser)
back_(NULL),
forward_(NULL),
reload_(NULL),
-#if defined(OS_CHROMEOS)
- feedback_(NULL),
-#endif
home_(NULL),
location_bar_(NULL),
browser_actions_(NULL),
@@ -167,17 +164,6 @@ void ToolbarView::Init(Profile* profile) {
reload_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_RELOAD));
reload_->SetID(VIEW_ID_RELOAD_BUTTON);
-#if defined(OS_CHROMEOS)
- feedback_ = new views::ImageButton(this);
- feedback_->set_tag(IDC_FEEDBACK);
- feedback_->set_triggerable_event_flags(ui::EF_LEFT_BUTTON_DOWN |
- ui::EF_MIDDLE_BUTTON_DOWN);
- feedback_->set_tag(IDC_FEEDBACK);
- feedback_->SetTooltipText(
- UTF16ToWide(l10n_util::GetStringUTF16(IDS_TOOLTIP_FEEDBACK)));
- feedback_->SetID(VIEW_ID_FEEDBACK_BUTTON);
-#endif
-
home_ = new views::ImageButton(this);
home_->set_triggerable_event_flags(ui::EF_LEFT_BUTTON_DOWN |
ui::EF_MIDDLE_BUTTON_DOWN);
@@ -211,9 +197,6 @@ void ToolbarView::Init(Profile* profile) {
AddChildView(home_);
AddChildView(location_bar_);
AddChildView(browser_actions_);
-#if defined(OS_CHROMEOS)
- AddChildView(feedback_);
-#endif
AddChildView(app_menu_);
location_bar_->Init();
@@ -427,9 +410,6 @@ gfx::Size ToolbarView::GetPreferredSize() {
(show_home_button_.GetValue() ?
(home_->GetPreferredSize().width() + kButtonSpacing) : 0) +
browser_actions_->GetPreferredSize().width() +
-#if defined(OS_CHROMEOS)
- feedback_->GetPreferredSize().width() + kButtonSpacing +
-#endif
app_menu_->GetPreferredSize().width() + kEdgeSpacing;
static SkBitmap normal_background;
@@ -496,16 +476,9 @@ void ToolbarView::Layout() {
}
int browser_actions_width = browser_actions_->GetPreferredSize().width();
-#if defined(OS_CHROMEOS)
- int feedback_menu_width = feedback_->GetPreferredSize().width() +
- kButtonSpacing;
-#endif
int app_menu_width = app_menu_->GetPreferredSize().width();
int location_x = home_->x() + home_->width() + kStandardSpacing;
int available_width = width() - kEdgeSpacing - app_menu_width -
-#if defined(OS_CHROMEOS)
- feedback_menu_width -
-#endif
browser_actions_width - location_x;
location_bar_->SetBounds(location_x, child_y, std::max(available_width, 0),
@@ -526,15 +499,8 @@ void ToolbarView::Layout() {
// we extend the back button to the left edge.
if (maximized)
app_menu_width += kEdgeSpacing;
-#if defined(OS_CHROMEOS)
- feedback_->SetBounds(browser_actions_->x() + browser_actions_width, child_y,
- feedback_->GetPreferredSize().width(), child_height);
- app_menu_->SetBounds(feedback_->x() + feedback_->width() + kButtonSpacing,
- child_y, app_menu_width, child_height);
-#else
app_menu_->SetBounds(browser_actions_->x() + browser_actions_width, child_y,
app_menu_width, child_height);
-#endif
}
void ToolbarView::OnPaint(gfx::Canvas* canvas) {
@@ -691,15 +657,6 @@ void ToolbarView::LoadImages() {
reload_->SetToggledImage(views::CustomButton::BS_DISABLED,
tp->GetBitmapNamed(IDR_STOP_D));
-#if defined(OS_CHROMEOS)
- feedback_->SetImage(views::CustomButton::BS_NORMAL,
- tp->GetBitmapNamed(IDR_FEEDBACK));
- feedback_->SetImage(views::CustomButton::BS_HOT,
- tp->GetBitmapNamed(IDR_FEEDBACK_H));
- feedback_->SetImage(views::CustomButton::BS_PUSHED,
- tp->GetBitmapNamed(IDR_FEEDBACK_P));
-#endif
-
home_->SetImage(views::CustomButton::BS_NORMAL, tp->GetBitmapNamed(IDR_HOME));
home_->SetImage(views::CustomButton::BS_HOT, tp->GetBitmapNamed(IDR_HOME_H));
home_->SetImage(views::CustomButton::BS_PUSHED,
diff --git a/chrome/browser/ui/views/toolbar_view.h b/chrome/browser/ui/views/toolbar_view.h
index 53616fc..a6d7f53 100644
--- a/chrome/browser/ui/views/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar_view.h
@@ -190,9 +190,6 @@ class ToolbarView : public AccessiblePaneView,
views::ImageButton* back_;
views::ImageButton* forward_;
ReloadButton* reload_;
-#if defined(OS_CHROMEOS)
- views::ImageButton* feedback_;
-#endif
views::ImageButton* home_;
LocationBarView* location_bar_;
BrowserActionsContainer* browser_actions_;