| OLD | NEW |
| 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 Loading... |
| 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 BookmarkBarView(Profile* profile, Browser* browser); | 74 explicit 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 Loading... |
| 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 | 115 virtual bool GetAccessibleName(std::wstring* name); |
| 116 // AccessibleToolbarView methods: | 116 virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); |
| 117 virtual bool IsAccessibleViewTraversable(views::View* view); | 117 virtual void SetAccessibleName(const std::wstring& name); |
| 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 GURL bubble_url_; | 478 GURL bubble_url_; |
| 479 | 479 |
| 480 // If the bookmark bubble is showing, this is the visible ancestor of the URL. | 480 // If the bookmark bubble is showing, this is the visible ancestor of the URL. |
| 481 // The visible ancestor is either the other_bookmarked_button_, | 481 // The visible ancestor is either the other_bookmarked_button_, |
| 482 // overflow_button_ or a button on the bar. | 482 // overflow_button_ or a button on the bar. |
| 483 views::CustomButton* throbbing_view_; | 483 views::CustomButton* throbbing_view_; |
| 484 | 484 |
| 485 // Background for extension toolstrips. | 485 // Background for extension toolstrips. |
| 486 SkBitmap toolstrip_background_; | 486 SkBitmap toolstrip_background_; |
| 487 | 487 |
| 488 // Storage of strings needed for accessibility. |
| 489 std::wstring accessible_name_; |
| 490 |
| 488 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); | 491 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); |
| 489 }; | 492 }; |
| 490 | 493 |
| 491 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_BAR_VIEW_H_ | 494 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_BAR_VIEW_H_ |
| OLD | NEW |