| 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_EXTENSIONS_EXTENSION_SHELF_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SHELF_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SHELF_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SHELF_H_ |
| 7 | 7 |
| 8 #include "app/gfx/canvas.h" | 8 #include "app/gfx/canvas.h" |
| 9 #include "base/task.h" | 9 #include "base/task.h" |
| 10 #include "chrome/browser/extensions/extension_view.h" | 10 #include "chrome/browser/extensions/extension_view.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 bool HasExtensionViews(); | 48 bool HasExtensionViews(); |
| 49 | 49 |
| 50 // ExtensionContainer | 50 // ExtensionContainer |
| 51 virtual void OnExtensionMouseEvent(ExtensionView* view); | 51 virtual void OnExtensionMouseEvent(ExtensionView* view); |
| 52 virtual void OnExtensionMouseLeave(ExtensionView* view); | 52 virtual void OnExtensionMouseLeave(ExtensionView* view); |
| 53 | 53 |
| 54 // BrowserBubble::Delegate | 54 // BrowserBubble::Delegate |
| 55 virtual void BubbleBrowserWindowMoved(BrowserBubble* bubble); | 55 virtual void BubbleBrowserWindowMoved(BrowserBubble* bubble); |
| 56 virtual void BubbleBrowserWindowClosed(BrowserBubble* bubble); | 56 virtual void BubbleBrowserWindowClosed(BrowserBubble* bubble); |
| 57 | 57 |
| 58 // Dragging toolstrips |
| 59 void DragExtension(); |
| 60 void DropExtension(const gfx::Point& pt, bool cancel); |
| 61 void DragHandleTo(const gfx::Point& pt); |
| 62 |
| 58 protected: | 63 protected: |
| 59 // View | 64 // View |
| 60 virtual void ChildPreferredSizeChanged(View* child); | 65 virtual void ChildPreferredSizeChanged(View* child); |
| 61 | 66 |
| 62 private: | 67 private: |
| 63 // Inits the background bitmap. | 68 // Inits the background bitmap. |
| 64 void InitBackground(gfx::Canvas* canvas, const SkRect& subset); | 69 void InitBackground(gfx::Canvas* canvas, const SkRect& subset); |
| 65 | 70 |
| 66 // Removes any toolstrips associated with an extension. | 71 // Removes any toolstrips associated with an extension. |
| 67 bool RemoveExtensionViews(Extension* extension); | 72 bool RemoveExtensionViews(Extension* extension); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 89 | 94 |
| 90 // Whether to handle is visible; | 95 // Whether to handle is visible; |
| 91 bool handle_visible_; | 96 bool handle_visible_; |
| 92 | 97 |
| 93 // Which child view the handle is currently over. | 98 // Which child view the handle is currently over. |
| 94 ExtensionView* current_handle_view_; | 99 ExtensionView* current_handle_view_; |
| 95 | 100 |
| 96 // Timers for tracking mouse hovering. | 101 // Timers for tracking mouse hovering. |
| 97 ScopedRunnableMethodFactory<ExtensionShelf> timer_factory_; | 102 ScopedRunnableMethodFactory<ExtensionShelf> timer_factory_; |
| 98 | 103 |
| 104 // A placeholder for a pending drag |
| 105 View* drag_placeholder_view_; |
| 106 |
| 99 DISALLOW_COPY_AND_ASSIGN(ExtensionShelf); | 107 DISALLOW_COPY_AND_ASSIGN(ExtensionShelf); |
| 100 }; | 108 }; |
| 101 | 109 |
| 102 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SHELF_H_ | 110 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SHELF_H_ |
| OLD | NEW |