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

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: review and gyp fixes. 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 // Check if a button is currently contained in the view.
58 bool ContainsButton(StatusAreaButton* button);
59
60 static BrowserView* GetBrowserViewForBrowser(Browser* browser);
61
49 // BrowserView implementation. 62 // BrowserView implementation.
50 virtual void Init() OVERRIDE; 63 virtual void Init() OVERRIDE;
51 virtual void Show() OVERRIDE; 64 virtual void Show() OVERRIDE;
52 virtual void ShowInactive() OVERRIDE; 65 virtual void ShowInactive() OVERRIDE;
53 virtual void FocusChromeOSStatus() OVERRIDE; 66 virtual void FocusChromeOSStatus() OVERRIDE;
54 virtual views::LayoutManager* CreateLayoutManager() const OVERRIDE; 67 virtual views::LayoutManager* CreateLayoutManager() const OVERRIDE;
55 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; 68 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
56 virtual bool GetSavedWindowPlacement( 69 virtual bool GetSavedWindowPlacement(
57 gfx::Rect* bounds, 70 gfx::Rect* bounds,
58 ui::WindowShowState* show_state) const OVERRIDE; 71 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 157 // Should the layout mode button be shown? We only show it if there are
145 // multiple browsers open. 158 // multiple browsers open.
146 bool should_show_layout_mode_button_; 159 bool should_show_layout_mode_button_;
147 160
148 DISALLOW_COPY_AND_ASSIGN(BrowserView); 161 DISALLOW_COPY_AND_ASSIGN(BrowserView);
149 }; 162 };
150 163
151 } // namespace chromeos 164 } // namespace chromeos
152 165
153 #endif // CHROME_BROWSER_CHROMEOS_FRAME_BROWSER_VIEW_H_ 166 #endif // CHROME_BROWSER_CHROMEOS_FRAME_BROWSER_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/frame/browser_view.cc » ('j') | chrome/browser/chromeos/frame/browser_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698