OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BOOKMARK_BAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARK_BAR_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARK_BAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARK_BAR_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // View methods: | 120 // View methods: |
121 virtual gfx::Size GetPreferredSize(); | 121 virtual gfx::Size GetPreferredSize(); |
122 virtual gfx::Size GetMinimumSize(); | 122 virtual gfx::Size GetMinimumSize(); |
123 virtual void Layout(); | 123 virtual void Layout(); |
124 virtual void DidChangeBounds(const gfx::Rect& previous, | 124 virtual void DidChangeBounds(const gfx::Rect& previous, |
125 const gfx::Rect& current); | 125 const gfx::Rect& current); |
126 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); | 126 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); |
127 virtual void PaintChildren(gfx::Canvas* canvas); | 127 virtual void PaintChildren(gfx::Canvas* canvas); |
128 virtual bool GetDropFormats( | 128 virtual bool GetDropFormats( |
129 int* formats, | 129 int* formats, |
130 std::set<OSExchangeData::CustomFormat>* custom_formats); | 130 std::set<ui::OSExchangeData::CustomFormat>* custom_formats); |
131 virtual bool AreDropTypesRequired(); | 131 virtual bool AreDropTypesRequired(); |
132 virtual bool CanDrop(const OSExchangeData& data); | 132 virtual bool CanDrop(const ui::OSExchangeData& data); |
133 virtual void OnDragEntered(const views::DropTargetEvent& event); | 133 virtual void OnDragEntered(const views::DropTargetEvent& event); |
134 virtual int OnDragUpdated(const views::DropTargetEvent& event); | 134 virtual int OnDragUpdated(const views::DropTargetEvent& event); |
135 virtual void OnDragExited(); | 135 virtual void OnDragExited(); |
136 virtual int OnPerformDrop(const views::DropTargetEvent& event); | 136 virtual int OnPerformDrop(const views::DropTargetEvent& event); |
137 virtual void ShowContextMenu(const gfx::Point& p, bool is_mouse_gesture); | 137 virtual void ShowContextMenu(const gfx::Point& p, bool is_mouse_gesture); |
138 | 138 |
139 // AccessiblePaneView methods: | 139 // AccessiblePaneView methods: |
140 virtual bool IsAccessibleViewTraversable(views::View* view); | 140 virtual bool IsAccessibleViewTraversable(views::View* view); |
141 virtual AccessibilityTypes::Role GetAccessibleRole(); | 141 virtual AccessibilityTypes::Role GetAccessibleRole(); |
142 | 142 |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 // Invoked when the favicon is available. If the node is a child of the | 340 // Invoked when the favicon is available. If the node is a child of the |
341 // root node, the appropriate button is updated. If a menu is showing, the | 341 // root node, the appropriate button is updated. If a menu is showing, the |
342 // call is forwarded to the menu to allow for it to update the icon. | 342 // call is forwarded to the menu to allow for it to update the icon. |
343 virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model, | 343 virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model, |
344 const BookmarkNode* node); | 344 const BookmarkNode* node); |
345 | 345 |
346 // DragController method. Determines the node representing sender and invokes | 346 // DragController method. Determines the node representing sender and invokes |
347 // WriteDragData to write the actual data. | 347 // WriteDragData to write the actual data. |
348 virtual void WriteDragData(views::View* sender, | 348 virtual void WriteDragData(views::View* sender, |
349 const gfx::Point& press_pt, | 349 const gfx::Point& press_pt, |
350 OSExchangeData* data); | 350 ui::OSExchangeData* data); |
351 | 351 |
352 virtual int GetDragOperations(views::View* sender, const gfx::Point& p); | 352 virtual int GetDragOperations(views::View* sender, const gfx::Point& p); |
353 | 353 |
354 virtual bool CanStartDrag(views::View* sender, | 354 virtual bool CanStartDrag(views::View* sender, |
355 const gfx::Point& press_pt, | 355 const gfx::Point& press_pt, |
356 const gfx::Point& p); | 356 const gfx::Point& p); |
357 | 357 |
358 // Writes a BookmarkNodeData for node to data. | 358 // Writes a BookmarkNodeData for node to data. |
359 void WriteDragData(const BookmarkNode* node, OSExchangeData* data); | 359 void WriteDragData(const BookmarkNode* node, ui::OSExchangeData* data); |
360 | 360 |
361 // ViewMenuDelegate method. Ends up creating a BookmarkMenuController to | 361 // ViewMenuDelegate method. Ends up creating a BookmarkMenuController to |
362 // show the menu. | 362 // show the menu. |
363 virtual void RunMenu(views::View* view, const gfx::Point& pt); | 363 virtual void RunMenu(views::View* view, const gfx::Point& pt); |
364 | 364 |
365 // Invoked when a star entry corresponding to a URL on the bookmark bar is | 365 // Invoked when a star entry corresponding to a URL on the bookmark bar is |
366 // pressed. Forwards to the PageNavigator to open the URL. | 366 // pressed. Forwards to the PageNavigator to open the URL. |
367 virtual void ButtonPressed(views::Button* sender, const views::Event& event); | 367 virtual void ButtonPressed(views::Button* sender, const views::Event& event); |
368 | 368 |
369 // Invoked for this View, one of the buttons or the 'other' button. Shows the | 369 // Invoked for this View, one of the buttons or the 'other' button. Shows the |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 // overflow_button_ or a button on the bar. | 501 // overflow_button_ or a button on the bar. |
502 views::CustomButton* throbbing_view_; | 502 views::CustomButton* throbbing_view_; |
503 | 503 |
504 // Background for extension toolstrips. | 504 // Background for extension toolstrips. |
505 SkBitmap toolstrip_background_; | 505 SkBitmap toolstrip_background_; |
506 | 506 |
507 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); | 507 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); |
508 }; | 508 }; |
509 | 509 |
510 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARK_BAR_VIEW_H_ | 510 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARK_BAR_VIEW_H_ |
OLD | NEW |