diff options
Diffstat (limited to 'chrome/browser/views/toolbar_view.h')
-rw-r--r-- | chrome/browser/views/toolbar_view.h | 53 |
1 files changed, 1 insertions, 52 deletions
diff --git a/chrome/browser/views/toolbar_view.h b/chrome/browser/views/toolbar_view.h index 675eb33..23f5232 100644 --- a/chrome/browser/views/toolbar_view.h +++ b/chrome/browser/views/toolbar_view.h @@ -20,7 +20,6 @@ #include "chrome/browser/views/location_bar_view.h" #include "views/controls/button/menu_button.h" #include "views/controls/menu/menu.h" -#include "views/controls/menu/menu_wrapper.h" #include "views/controls/menu/view_menu_delegate.h" #include "views/view.h" @@ -37,7 +36,6 @@ class Menu2; class ToolbarView : public AccessibleToolbarView, public views::ViewMenuDelegate, public views::DragController, - public views::FocusChangeListener, public menus::SimpleMenuModel::Delegate, public LocationBarView::Delegate, public NotificationObserver, @@ -46,7 +44,7 @@ class ToolbarView : public AccessibleToolbarView, public BubblePositioner { public: explicit ToolbarView(Browser* browser); - virtual ~ToolbarView(); + virtual ~ToolbarView() { } // Create the contents of the Browser Toolbar void Init(Profile* profile); @@ -64,25 +62,6 @@ class ToolbarView : public AccessibleToolbarView, // Sets the app menu model. void SetAppMenuModel(AppMenuModel* model); - // Focuses the page menu and enters a special mode where the page - // and app menus are focusable and allow for keyboard navigation just - // like a normal menu bar. As soon as focus leaves one of the menus, - // the special mode is exited. - // - // Pass it the storage id of the view where focus should be returned - // if the user escapes, and the menu button to focus initially. If - // |menu_to_focus| is NULL, it will focus the page menu by default. - // - // Not used on the Mac, which has a "normal" menu bar. - void EnterMenuBarEmulationMode(int last_focused_view_storage_id, - views::MenuButton* menu_to_focus); - - // Add a listener to receive a callback when the menu opens. - void AddMenuListener(views::MenuListener* listener); - - // Remove a menu listener. - void RemoveMenuListener(views::MenuListener* listener); - // Accessors... Browser* browser() const { return browser_; } BrowserActionsContainer* browser_actions() const { return browser_actions_; } @@ -92,10 +71,6 @@ class ToolbarView : public AccessibleToolbarView, views::MenuButton* page_menu() const { return page_menu_; } views::MenuButton* app_menu() const { return app_menu_; } - // Overridden from views::FocusChangeListener: - virtual void FocusWillChange(views::View* focused_before, - views::View* focused_now); - // Overridden from AccessibleToolbarView: virtual bool IsAccessibleViewTraversable(views::View* view); @@ -131,7 +106,6 @@ class ToolbarView : public AccessibleToolbarView, virtual void ExecuteCommand(int command_id); // Overridden from views::View: - virtual bool AcceleratorPressed(const views::Accelerator& accelerator); virtual gfx::Size GetPreferredSize(); virtual void Layout(); virtual void Paint(gfx::Canvas* canvas); @@ -164,13 +138,6 @@ class ToolbarView : public AccessibleToolbarView, void RunPageMenu(const gfx::Point& pt); void RunAppMenu(const gfx::Point& pt); - // Check if the menu exited with a code indicating the user wants to - // switch to the other menu, and then switch to that other menu. - void SwitchToOtherMenuIfNeeded(views::Menu2* previous_menu, - views::MenuButton* next_menu_button); - - void ActivateMenuButton(views::MenuButton* menu_button); - // Types of display mode this toolbar can have. enum DisplayMode { DISPLAYMODE_NORMAL, // Normal toolbar with buttons, etc. @@ -181,14 +148,6 @@ class ToolbarView : public AccessibleToolbarView, return display_mode_ == DISPLAYMODE_NORMAL; } - // Take the menus out of the focus traversal, unregister accelerators, - // and stop listening to focus change events. - void ExitMenuBarEmulationMode(); - - // Restore the view that was focused before EnterMenuBarEmulationMode - // was called. - void RestoreLastFocusedView(); - scoped_ptr<BackForwardMenuModel> back_menu_model_; scoped_ptr<BackForwardMenuModel> forward_menu_model_; @@ -227,16 +186,6 @@ class ToolbarView : public AccessibleToolbarView, // TODO(beng): build these into MenuButton. scoped_ptr<views::Menu2> page_menu_menu_; scoped_ptr<views::Menu2> app_menu_menu_; - - // Storage id for the last view that was focused before focus - // was given to one of the toolbar views. - int last_focused_view_storage_id_; - - // Vector of listeners to receive callbacks when the menu opens. - std::vector<views::MenuListener*> menu_listeners_; - - // Used to post tasks to switch to the next/previous menu. - ScopedRunnableMethodFactory<ToolbarView> method_factory_; }; #endif // CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_ |