Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(727)

Side by Side Diff: chrome/browser/ui/views/toolbar_view.cc

Issue 11298004: alternate ntp: add "Recent Tabs" submenu to wrench menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/views/toolbar_view.h" 5 #include "chrome/browser/ui/views/toolbar_view.h"
6 6
7 #include "base/i18n/number_formatting.h" 7 #include "base/i18n/number_formatting.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/command_updater.h" 10 #include "chrome/browser/command_updater.h"
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 return GetWidget()->GetAccelerator(id, accel); 415 return GetWidget()->GetAccelerator(id, accel);
416 } 416 }
417 417
418 //////////////////////////////////////////////////////////////////////////////// 418 ////////////////////////////////////////////////////////////////////////////////
419 // ToolbarView, views::MenuButtonListener implementation: 419 // ToolbarView, views::MenuButtonListener implementation:
420 420
421 void ToolbarView::OnMenuButtonClicked(views::View* source, 421 void ToolbarView::OnMenuButtonClicked(views::View* source,
422 const gfx::Point& point) { 422 const gfx::Point& point) {
423 DCHECK_EQ(VIEW_ID_APP_MENU, source->id()); 423 DCHECK_EQ(VIEW_ID_APP_MENU, source->id());
424 424
425 wrench_menu_model_.reset(new WrenchMenuModel(this, browser_));
sky 2012/11/07 00:10:47 This order goes against your comment in the header
kuan 2012/11/07 02:29:46 my comment in header said wrench_menu_model_ shld
kuan 2012/11/07 16:48:52 now, i understand what u mean; u're right, i shld
425 wrench_menu_.reset(new WrenchMenu(browser_)); 426 wrench_menu_.reset(new WrenchMenu(browser_));
426 wrench_menu_model_.reset(new WrenchMenuModel(this, browser_));
427 wrench_menu_->Init(wrench_menu_model_.get()); 427 wrench_menu_->Init(wrench_menu_model_.get());
428 428
429 FOR_EACH_OBSERVER(views::MenuListener, menu_listeners_, OnMenuOpened()); 429 FOR_EACH_OBSERVER(views::MenuListener, menu_listeners_, OnMenuOpened());
430 430
431 wrench_menu_->RunMenu(app_menu_); 431 wrench_menu_->RunMenu(app_menu_);
432 } 432 }
433 433
434 //////////////////////////////////////////////////////////////////////////////// 434 ////////////////////////////////////////////////////////////////////////////////
435 // ToolbarView, LocationBarView::Delegate implementation: 435 // ToolbarView, LocationBarView::Delegate implementation:
436 436
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 accname_app = l10n_util::GetStringFUTF16( 888 accname_app = l10n_util::GetStringFUTF16(
889 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app); 889 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app);
890 } 890 }
891 app_menu_->SetAccessibleName(accname_app); 891 app_menu_->SetAccessibleName(accname_app);
892 892
893 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL)); 893 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL));
894 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT)); 894 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT));
895 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED)); 895 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED));
896 SchedulePaint(); 896 SchedulePaint();
897 } 897 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698