Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: chrome/browser/chromeos/frame/browser_view.h

Issue 8476003: Implement the status tray/icon API for ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebasing to test with the bots. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 static BrowserView* GetBrowserViewForBrowser(Browser* browser);
58
49 // BrowserView implementation. 59 // BrowserView implementation.
50 virtual void Init() OVERRIDE; 60 virtual void Init() OVERRIDE;
51 virtual void Show() OVERRIDE; 61 virtual void Show() OVERRIDE;
52 virtual void ShowInactive() OVERRIDE; 62 virtual void ShowInactive() OVERRIDE;
53 virtual void FocusChromeOSStatus() OVERRIDE; 63 virtual void FocusChromeOSStatus() OVERRIDE;
54 virtual views::LayoutManager* CreateLayoutManager() const OVERRIDE; 64 virtual views::LayoutManager* CreateLayoutManager() const OVERRIDE;
55 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; 65 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
56 virtual bool GetSavedWindowPlacement( 66 virtual bool GetSavedWindowPlacement(
57 gfx::Rect* bounds, 67 gfx::Rect* bounds,
58 ui::WindowShowState* show_state) const OVERRIDE; 68 ui::WindowShowState* show_state) const OVERRIDE;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // Should the layout mode button be shown? We only show it if there are 154 // Should the layout mode button be shown? We only show it if there are
145 // multiple browsers open. 155 // multiple browsers open.
146 bool should_show_layout_mode_button_; 156 bool should_show_layout_mode_button_;
147 157
148 DISALLOW_COPY_AND_ASSIGN(BrowserView); 158 DISALLOW_COPY_AND_ASSIGN(BrowserView);
149 }; 159 };
150 160
151 } // namespace chromeos 161 } // namespace chromeos
152 162
153 #endif // CHROME_BROWSER_CHROMEOS_FRAME_BROWSER_VIEW_H_ 163 #endif // CHROME_BROWSER_CHROMEOS_FRAME_BROWSER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698