| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 public content::NotificationObserver, | 39 public content::NotificationObserver, |
| 40 public CommandUpdater::CommandObserver, | 40 public CommandUpdater::CommandObserver, |
| 41 public views::ButtonListener { | 41 public views::ButtonListener { |
| 42 public: | 42 public: |
| 43 // The view class name. | 43 // The view class name. |
| 44 static const char kViewClassName[]; | 44 static const char kViewClassName[]; |
| 45 | 45 |
| 46 explicit ToolbarView(Browser* browser); | 46 explicit ToolbarView(Browser* browser); |
| 47 virtual ~ToolbarView(); | 47 virtual ~ToolbarView(); |
| 48 | 48 |
| 49 // Create the contents of the Browser Toolbar | 49 // Create the contents of the Browser Toolbar. |popup_parent_view| is the |
| 50 void Init(); | 50 // View to add the omnibox popup view to. |
| 51 // TODO(sky): clearly describe when |popup_parent_view| is used. |
| 52 void Init(views::View* popup_parent_view); |
| 51 | 53 |
| 52 // Updates the toolbar (and transitively the location bar) with the states of | 54 // Updates the toolbar (and transitively the location bar) with the states of |
| 53 // the specified |tab|. If |should_restore_state| is true, we're switching | 55 // the specified |tab|. If |should_restore_state| is true, we're switching |
| 54 // (back?) to this tab and should restore any previous location bar state | 56 // (back?) to this tab and should restore any previous location bar state |
| 55 // (such as user editing) as well. | 57 // (such as user editing) as well. |
| 56 void Update(content::WebContents* tab, bool should_restore_state); | 58 void Update(content::WebContents* tab, bool should_restore_state); |
| 57 | 59 |
| 58 // Set focus to the toolbar with complete keyboard access, with the | 60 // Set focus to the toolbar with complete keyboard access, with the |
| 59 // focus initially set to the app menu. Focus will be restored | 61 // focus initially set to the app menu. Focus will be restored |
| 60 // to the last focused view if the user escapes. | 62 // to the last focused view if the user escapes. |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 216 |
| 215 // A list of listeners to call when the menu opens. | 217 // A list of listeners to call when the menu opens. |
| 216 ObserverList<views::MenuListener> menu_listeners_; | 218 ObserverList<views::MenuListener> menu_listeners_; |
| 217 | 219 |
| 218 content::NotificationRegistrar registrar_; | 220 content::NotificationRegistrar registrar_; |
| 219 | 221 |
| 220 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); | 222 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); |
| 221 }; | 223 }; |
| 222 | 224 |
| 223 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ | 225 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ |
| OLD | NEW |