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

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

Issue 2374253002: Fix bookmark bubble/star view highlighting for Harmony. (Closed)
Patch Set: fix tests, move bubble creation to toolbar Created 4 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_TOOLBAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 10 matching lines...) Expand all
21 #include "ui/views/view.h" 21 #include "ui/views/view.h"
22 22
23 class AppMenuButton; 23 class AppMenuButton;
24 class BackButton; 24 class BackButton;
25 class Browser; 25 class Browser;
26 class BrowserActionsContainer; 26 class BrowserActionsContainer;
27 class HomeButton; 27 class HomeButton;
28 class ReloadButton; 28 class ReloadButton;
29 class ToolbarButton; 29 class ToolbarButton;
30 30
31 namespace bookmarks {
32 class BookmarkBubbleObserver;
33 }
34
31 namespace extensions { 35 namespace extensions {
32 class Command; 36 class Command;
33 class Extension; 37 class Extension;
34 } 38 }
35 39
36 // The Browser Window's toolbar. 40 // The Browser Window's toolbar.
37 class ToolbarView : public views::AccessiblePaneView, 41 class ToolbarView : public views::AccessiblePaneView,
38 public views::MenuButtonListener, 42 public views::MenuButtonListener,
39 public ui::AcceleratorProvider, 43 public ui::AcceleratorProvider,
40 public LocationBarView::Delegate, 44 public LocationBarView::Delegate,
(...skipping 23 matching lines...) Expand all
64 // Set focus to the toolbar with complete keyboard access, with the 68 // Set focus to the toolbar with complete keyboard access, with the
65 // focus initially set to the app menu. Focus will be restored 69 // focus initially set to the app menu. Focus will be restored
66 // to the last focused view if the user escapes. 70 // to the last focused view if the user escapes.
67 void SetPaneFocusAndFocusAppMenu(); 71 void SetPaneFocusAndFocusAppMenu();
68 72
69 // Returns true if the app menu is focused. 73 // Returns true if the app menu is focused.
70 bool IsAppMenuFocused(); 74 bool IsAppMenuFocused();
71 75
72 virtual bool GetAcceleratorInfo(int id, ui::Accelerator* accel); 76 virtual bool GetAcceleratorInfo(int id, ui::Accelerator* accel);
73 77
74 // Returns the view to which the bookmark bubble should be anchored. 78 // Shows a bookmark bubble and anchors it appropriately.
75 views::View* GetBookmarkBubbleAnchor(); 79 void ShowBookmarkBubble(const GURL& url,
80 bool already_bookmarked,
81 bookmarks::BookmarkBubbleObserver* observer);
76 82
77 // Returns the view to which the "Save credit card" bubble should be anchored. 83 // Returns the view to which the "Save credit card" bubble should be anchored.
78 views::View* GetSaveCreditCardBubbleAnchor(); 84 views::View* GetSaveCreditCardBubbleAnchor();
79 85
80 // Returns the view to which the Translate bubble should be anchored. 86 // Returns the view to which the Translate bubble should be anchored.
81 views::View* GetTranslateBubbleAnchor(); 87 views::View* GetTranslateBubbleAnchor();
82 88
83 // Adds |anchor_view| as an observer of |bubble_widget| to track its 89 // Adds |anchor_view| as an observer of |bubble_widget| to track its
84 // visibility. 90 // visibility.
85 void OnBubbleCreatedForAnchor(views::View* anchor_view, 91 void OnBubbleCreatedForAnchor(views::View* anchor_view,
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 214
209 // The display mode used when laying out the toolbar. 215 // The display mode used when laying out the toolbar.
210 const DisplayMode display_mode_; 216 const DisplayMode display_mode_;
211 217
212 content::NotificationRegistrar registrar_; 218 content::NotificationRegistrar registrar_;
213 219
214 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); 220 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView);
215 }; 221 };
216 222
217 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ 223 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698