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

Side by Side Diff: chrome/browser/views/toolbar_view.h

Issue 2817022: Small tweaks to improve toolbar keyboard accessibility: Put focus rects... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 6 months 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_
6 #define CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_ 6 #define CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/menus/simple_menu_model.h" 10 #include "app/menus/simple_menu_model.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Accessors... 80 // Accessors...
81 Browser* browser() const { return browser_; } 81 Browser* browser() const { return browser_; }
82 BrowserActionsContainer* browser_actions() const { return browser_actions_; } 82 BrowserActionsContainer* browser_actions() const { return browser_actions_; }
83 ReloadButton* reload_button() const { return reload_; } 83 ReloadButton* reload_button() const { return reload_; }
84 LocationBarView* location_bar() const { return location_bar_; } 84 LocationBarView* location_bar() const { return location_bar_; }
85 views::MenuButton* page_menu() const { return page_menu_; } 85 views::MenuButton* page_menu() const { return page_menu_; }
86 views::MenuButton* app_menu() const { return app_menu_; } 86 views::MenuButton* app_menu() const { return app_menu_; }
87 bool collapsed() const { return collapsed_; } 87 bool collapsed() const { return collapsed_; }
88 void SetCollapsed(bool val); 88 void SetCollapsed(bool val);
89 89
90 // Overridden from AccessibleToolbarView
91 virtual bool SetToolbarFocus(int view_storage_id, View* initial_focus);
92
90 // Overridden from Menu::BaseControllerDelegate: 93 // Overridden from Menu::BaseControllerDelegate:
91 virtual bool GetAcceleratorInfo(int id, menus::Accelerator* accel); 94 virtual bool GetAcceleratorInfo(int id, menus::Accelerator* accel);
92 95
93 // Overridden from views::MenuDelegate: 96 // Overridden from views::MenuDelegate:
94 virtual void RunMenu(views::View* source, const gfx::Point& pt); 97 virtual void RunMenu(views::View* source, const gfx::Point& pt);
95 98
96 // Overridden from LocationBarView::Delegate: 99 // Overridden from LocationBarView::Delegate:
97 virtual TabContents* GetTabContents(); 100 virtual TabContents* GetTabContents();
98 virtual void OnInputInProgress(bool in_progress); 101 virtual void OnInputInProgress(bool in_progress);
99 102
(...skipping 18 matching lines...) Expand all
118 menus::Accelerator* accelerator); 121 menus::Accelerator* accelerator);
119 virtual void ExecuteCommand(int command_id); 122 virtual void ExecuteCommand(int command_id);
120 123
121 // Overridden from views::View: 124 // Overridden from views::View:
122 virtual gfx::Size GetPreferredSize(); 125 virtual gfx::Size GetPreferredSize();
123 virtual void Layout(); 126 virtual void Layout();
124 virtual void Paint(gfx::Canvas* canvas); 127 virtual void Paint(gfx::Canvas* canvas);
125 virtual void ThemeChanged(); 128 virtual void ThemeChanged();
126 129
127 protected: 130 protected:
128 // Override this so that when the user presses F6 to rotate toolbar panes, 131
129 // the location bar gets focus, not the first control in the toolbar. 132 // Overridden from AccessibleToolbarView
130 virtual views::View* GetDefaultFocusableChild(); 133 virtual views::View* GetDefaultFocusableChild();
134 virtual void RemoveToolbarFocus();
131 135
132 private: 136 private:
133 // Returns the number of pixels above the location bar in non-normal display. 137 // Returns the number of pixels above the location bar in non-normal display.
134 int PopupTopSpacing() const; 138 int PopupTopSpacing() const;
135 139
136 // Loads the images for all the child views. 140 // Loads the images for all the child views.
137 void LoadImages(); 141 void LoadImages();
138 142
139 // Runs various menus. 143 // Runs various menus.
140 void RunPageMenu(const gfx::Point& pt); 144 void RunPageMenu(const gfx::Point& pt);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // running. 229 // running.
226 bool* destroyed_flag_; 230 bool* destroyed_flag_;
227 231
228 // When collapsed, the toolbar is just a tiny strip, no controls are visible. 232 // When collapsed, the toolbar is just a tiny strip, no controls are visible.
229 bool collapsed_; 233 bool collapsed_;
230 234
231 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); 235 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView);
232 }; 236 };
233 237
234 #endif // CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_ 238 #endif // CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698