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_CHROMEOS_FRAME_BROWSER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FRAME_BROWSER_VIEW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_FRAME_BROWSER_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FRAME_BROWSER_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 class BrowserView : public ::BrowserView, | 39 class BrowserView : public ::BrowserView, |
40 public views::ContextMenuController, | 40 public views::ContextMenuController, |
41 public views::MenuListener, | 41 public views::MenuListener, |
42 public BrowserList::Observer, | 42 public BrowserList::Observer, |
43 public StatusAreaButton::Delegate, | 43 public StatusAreaButton::Delegate, |
44 public MessageLoopForUI::Observer { | 44 public MessageLoopForUI::Observer { |
45 public: | 45 public: |
46 explicit BrowserView(Browser* browser); | 46 explicit BrowserView(Browser* browser); |
47 virtual ~BrowserView(); | 47 virtual ~BrowserView(); |
48 | 48 |
49 // Adds a new tray icon/button to the Chrome OS Tray. | |
50 // Takes ownership of the button object. | |
51 void AddTrayButton(StatusAreaButton* button, bool bordered); | |
52 | |
53 // Remove an existing tray button from the Chrome OS Tray. | |
54 // Pointer will become invalid after this call. | |
55 void RemoveTrayButton(StatusAreaButton* button); | |
56 | |
57 // Check if a button is currently contained in the view. | |
58 bool ContainsButton(StatusAreaButton* button); | |
59 | |
60 static BrowserView* GetBrowserViewForBrowser(Browser* browser); | |
61 | |
62 // BrowserView implementation. | 49 // BrowserView implementation. |
63 virtual void Init() OVERRIDE; | 50 virtual void Init() OVERRIDE; |
64 virtual void Show() OVERRIDE; | 51 virtual void Show() OVERRIDE; |
65 virtual void ShowInactive() OVERRIDE; | 52 virtual void ShowInactive() OVERRIDE; |
66 virtual void FocusChromeOSStatus() OVERRIDE; | 53 virtual void FocusChromeOSStatus() OVERRIDE; |
67 virtual views::LayoutManager* CreateLayoutManager() const OVERRIDE; | 54 virtual views::LayoutManager* CreateLayoutManager() const OVERRIDE; |
68 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; | 55 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; |
69 virtual bool GetSavedWindowPlacement( | 56 virtual bool GetSavedWindowPlacement( |
70 gfx::Rect* bounds, | 57 gfx::Rect* bounds, |
71 ui::WindowShowState* show_state) const OVERRIDE; | 58 ui::WindowShowState* show_state) const OVERRIDE; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 // Should the layout mode button be shown? We only show it if there are | 144 // Should the layout mode button be shown? We only show it if there are |
158 // multiple browsers open. | 145 // multiple browsers open. |
159 bool should_show_layout_mode_button_; | 146 bool should_show_layout_mode_button_; |
160 | 147 |
161 DISALLOW_COPY_AND_ASSIGN(BrowserView); | 148 DISALLOW_COPY_AND_ASSIGN(BrowserView); |
162 }; | 149 }; |
163 | 150 |
164 } // namespace chromeos | 151 } // namespace chromeos |
165 | 152 |
166 #endif // CHROME_BROWSER_CHROMEOS_FRAME_BROWSER_VIEW_H_ | 153 #endif // CHROME_BROWSER_CHROMEOS_FRAME_BROWSER_VIEW_H_ |
OLD | NEW |