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_EXTENSIONS_EXTENSION_SHELF_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_SHELF_H_ |
6 #define CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_SHELF_H_ | 6 #define CHROME_BROWSER_VIEWS_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_shelf_model.h" | 10 #include "chrome/browser/extensions/extension_shelf_model.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 // A shelf that contains Extension toolstrips. | 22 // A shelf that contains Extension toolstrips. |
23 class ExtensionShelf : public views::View, | 23 class ExtensionShelf : public views::View, |
24 public ExtensionContainer, | 24 public ExtensionContainer, |
25 public BrowserBubble::Delegate, | 25 public BrowserBubble::Delegate, |
26 public ExtensionShelfModelObserver { | 26 public ExtensionShelfModelObserver { |
27 public: | 27 public: |
28 explicit ExtensionShelf(Browser* browser); | 28 explicit ExtensionShelf(Browser* browser); |
29 virtual ~ExtensionShelf(); | 29 virtual ~ExtensionShelf(); |
30 | 30 |
| 31 // Get the current model. |
| 32 ExtensionShelfModel* model() { return model_.get(); } |
| 33 |
31 // Return the current active ExtensionShelfHandle (if any). | 34 // Return the current active ExtensionShelfHandle (if any). |
32 BrowserBubble* GetHandle(); | 35 BrowserBubble* GetHandle(); |
33 | 36 |
34 // View | 37 // View |
35 virtual void Paint(gfx::Canvas* canvas); | 38 virtual void Paint(gfx::Canvas* canvas); |
36 virtual gfx::Size GetPreferredSize(); | 39 virtual gfx::Size GetPreferredSize(); |
37 virtual void Layout(); | 40 virtual void Layout(); |
38 virtual void OnMouseExited(const views::MouseEvent& event); | 41 virtual void OnMouseExited(const views::MouseEvent& event); |
39 virtual void OnMouseEntered(const views::MouseEvent& event); | 42 virtual void OnMouseEntered(const views::MouseEvent& event); |
40 | 43 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // A placeholder for a pending drag | 111 // A placeholder for a pending drag |
109 View* drag_placeholder_view_; | 112 View* drag_placeholder_view_; |
110 | 113 |
111 // The model representing the toolstrips on the shelf. | 114 // The model representing the toolstrips on the shelf. |
112 scoped_ptr<ExtensionShelfModel> model_; | 115 scoped_ptr<ExtensionShelfModel> model_; |
113 | 116 |
114 DISALLOW_COPY_AND_ASSIGN(ExtensionShelf); | 117 DISALLOW_COPY_AND_ASSIGN(ExtensionShelf); |
115 }; | 118 }; |
116 | 119 |
117 #endif // CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_SHELF_H_ | 120 #endif // CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_SHELF_H_ |
OLD | NEW |