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

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

Issue 333010: Implement keyboard access between bookmarks and toolbar. (Closed)
Patch Set: Add more null checks Created 11 years 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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_BOOKMARK_BAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_VIEWS_BOOKMARK_BAR_VIEW_H_
6 #define CHROME_BROWSER_VIEWS_BOOKMARK_BAR_VIEW_H_ 6 #define CHROME_BROWSER_VIEWS_BOOKMARK_BAR_VIEW_H_
7 7
8 #include "app/slide_animation.h" 8 #include "app/slide_animation.h"
9 #include "chrome/browser/bookmarks/bookmark_drag_data.h" 9 #include "chrome/browser/bookmarks/bookmark_drag_data.h"
10 #include "chrome/browser/bookmarks/bookmark_model_observer.h" 10 #include "chrome/browser/bookmarks/bookmark_model_observer.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 public: 64 public:
65 virtual ~ModelChangedListener() {} 65 virtual ~ModelChangedListener() {}
66 66
67 // Invoked when the model changes. Should cancel the edit and close any 67 // Invoked when the model changes. Should cancel the edit and close any
68 // dialogs. 68 // dialogs.
69 virtual void ModelChanged() = 0; 69 virtual void ModelChanged() = 0;
70 }; 70 };
71 71
72 static const int kNewtabBarHeight; 72 static const int kNewtabBarHeight;
73 73
74 explicit BookmarkBarView(Profile* profile, Browser* browser); 74 BookmarkBarView(Profile* profile, Browser* browser);
75 virtual ~BookmarkBarView(); 75 virtual ~BookmarkBarView();
76 76
77 // Resets the profile. This removes any buttons for the current profile and 77 // Resets the profile. This removes any buttons for the current profile and
78 // recreates the models. 78 // recreates the models.
79 void SetProfile(Profile* profile); 79 void SetProfile(Profile* profile);
80 80
81 // Returns the current profile. 81 // Returns the current profile.
82 Profile* GetProfile() { return profile_; } 82 Profile* GetProfile() { return profile_; }
83 83
84 // Returns the current browser. 84 // Returns the current browser.
(...skipping 20 matching lines...) Expand all
105 virtual void PaintChildren(gfx::Canvas* canvas); 105 virtual void PaintChildren(gfx::Canvas* canvas);
106 virtual bool GetDropFormats( 106 virtual bool GetDropFormats(
107 int* formats, 107 int* formats,
108 std::set<OSExchangeData::CustomFormat>* custom_formats); 108 std::set<OSExchangeData::CustomFormat>* custom_formats);
109 virtual bool AreDropTypesRequired(); 109 virtual bool AreDropTypesRequired();
110 virtual bool CanDrop(const OSExchangeData& data); 110 virtual bool CanDrop(const OSExchangeData& data);
111 virtual void OnDragEntered(const views::DropTargetEvent& event); 111 virtual void OnDragEntered(const views::DropTargetEvent& event);
112 virtual int OnDragUpdated(const views::DropTargetEvent& event); 112 virtual int OnDragUpdated(const views::DropTargetEvent& event);
113 virtual void OnDragExited(); 113 virtual void OnDragExited();
114 virtual int OnPerformDrop(const views::DropTargetEvent& event); 114 virtual int OnPerformDrop(const views::DropTargetEvent& event);
115 virtual bool GetAccessibleName(std::wstring* name); 115
116 virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); 116 // AccessibleToolbarView methods:
117 virtual void SetAccessibleName(const std::wstring& name); 117 virtual bool IsAccessibleViewTraversable(views::View* view);
118 118
119 // ProfileSyncServiceObserver method. 119 // ProfileSyncServiceObserver method.
120 virtual void OnStateChanged(); 120 virtual void OnStateChanged();
121 121
122 // Called when fullscreen mode toggles on or off; this affects our layout. 122 // Called when fullscreen mode toggles on or off; this affects our layout.
123 void OnFullscreenToggled(bool fullscreen); 123 void OnFullscreenToggled(bool fullscreen);
124 124
125 // Sets the model change listener to listener. 125 // Sets the model change listener to listener.
126 void SetModelChangedListener(ModelChangedListener* listener) { 126 void SetModelChangedListener(ModelChangedListener* listener) {
127 model_changed_listener_ = listener; 127 model_changed_listener_ = listener;
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 scoped_ptr<SlideAnimation> size_animation_; 481 scoped_ptr<SlideAnimation> size_animation_;
482 482
483 // If the bookmark bubble is showing, this is the visible ancestor of the URL. 483 // If the bookmark bubble is showing, this is the visible ancestor of the URL.
484 // The visible ancestor is either the other_bookmarked_button_, 484 // The visible ancestor is either the other_bookmarked_button_,
485 // overflow_button_ or a button on the bar. 485 // overflow_button_ or a button on the bar.
486 views::CustomButton* throbbing_view_; 486 views::CustomButton* throbbing_view_;
487 487
488 // Background for extension toolstrips. 488 // Background for extension toolstrips.
489 SkBitmap toolstrip_background_; 489 SkBitmap toolstrip_background_;
490 490
491 // Storage of strings needed for accessibility.
492 std::wstring accessible_name_;
493
494 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); 491 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView);
495 }; 492 };
496 493
497 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_BAR_VIEW_H_ 494 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_BAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/accessible_toolbar_view.cc ('k') | chrome/browser/views/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698