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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.h

Issue 8872015: [cros] Use a distinct icon for the guest session. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years 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_UI_VIEWS_FRAME_BROWSER_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // Accessor for the Toolbar. 151 // Accessor for the Toolbar.
152 ToolbarView* toolbar() const { return toolbar_; } 152 ToolbarView* toolbar() const { return toolbar_; }
153 153
154 // Returns true if various window components are visible. 154 // Returns true if various window components are visible.
155 virtual bool IsTabStripVisible() const; 155 virtual bool IsTabStripVisible() const;
156 156
157 // Returns true if the profile associated with this Browser window is 157 // Returns true if the profile associated with this Browser window is
158 // incognito. 158 // incognito.
159 bool IsOffTheRecord() const; 159 bool IsOffTheRecord() const;
160 160
161 // Returns true if the profile associated with this Browser window is
162 // a guest session.
163 bool IsGuestSession() const;
164
161 // Returns true if the non-client view should render an avatar icon. 165 // Returns true if the non-client view should render an avatar icon.
162 virtual bool ShouldShowAvatar() const; 166 virtual bool ShouldShowAvatar() const;
163 167
164 // Handle the specified |accelerator| being pressed. 168 // Handle the specified |accelerator| being pressed.
165 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; 169 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
166 170
167 // Provides the containing frame with the accelerator for the specified 171 // Provides the containing frame with the accelerator for the specified
168 // command id. This can be used to provide menu item shortcut hints etc. 172 // command id. This can be used to provide menu item shortcut hints etc.
169 // Returns true if an accelerator was found for the specified |cmd_id|, false 173 // Returns true if an accelerator was found for the specified |cmd_id|, false
170 // otherwise. 174 // otherwise.
171 bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator); 175 bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator);
172 176
173 // Shows the next app-modal dialog box, if there is one to be shown, or moves 177 // Shows the next app-modal dialog box, if there is one to be shown, or moves
174 // an existing showing one to the front. Returns true if one was shown or 178 // an existing showing one to the front. Returns true if one was shown or
175 // activated, false if none was shown. 179 // activated, false if none was shown.
176 bool ActivateAppModalDialog() const; 180 bool ActivateAppModalDialog() const;
177 181
178 // Returns the selected TabContents[Wrapper]. Used by our NonClientView's 182 // Returns the selected TabContents[Wrapper]. Used by our NonClientView's
179 // TabIconView::TabContentsProvider implementations. 183 // TabIconView::TabContentsProvider implementations.
180 // TODO(beng): exposing this here is a bit bogus, since it's only used to 184 // TODO(beng): exposing this here is a bit bogus, since it's only used to
181 // determine loading state. It'd be nicer if we could change this to be 185 // determine loading state. It'd be nicer if we could change this to be
182 // bool IsSelectedTabLoading() const; or something like that. We could even 186 // bool IsSelectedTabLoading() const; or something like that. We could even
183 // move it to a WindowDelegate subclass. 187 // move it to a WindowDelegate subclass.
184 TabContents* GetSelectedTabContents() const; 188 TabContents* GetSelectedTabContents() const;
185 TabContentsWrapper* GetSelectedTabContentsWrapper() const; 189 TabContentsWrapper* GetSelectedTabContentsWrapper() const;
186 190
187 // Retrieves the icon to use in the frame to indicate an OTR window. 191 // Retrieves the icon to use in the frame to indicate an OTR window.
188 SkBitmap GetOTRAvatarIcon(); 192 SkBitmap GetOTRAvatarIcon() const;
193
194 // Retrieves the icon to use in the frame to indicate guest session.
195 SkBitmap GetGuestAvatarIcon() const;
189 196
190 #if defined(OS_WIN) 197 #if defined(OS_WIN)
191 // Called right before displaying the system menu to allow the BrowserView 198 // Called right before displaying the system menu to allow the BrowserView
192 // to add or delete entries. 199 // to add or delete entries.
193 void PrepareToRunSystemMenu(HMENU menu); 200 void PrepareToRunSystemMenu(HMENU menu);
194 #endif 201 #endif
195 202
196 // Returns true if the Browser object associated with this BrowserView is a 203 // Returns true if the Browser object associated with this BrowserView is a
197 // tabbed-type window (i.e. a browser window, not an app or popup). 204 // tabbed-type window (i.e. a browser window, not an app or popup).
198 bool IsBrowserTypeNormal() const { 205 bool IsBrowserTypeNormal() const {
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 // If this flag is set then SetFocusToLocationBar() will set focus to the 732 // If this flag is set then SetFocusToLocationBar() will set focus to the
726 // location bar even if the browser window is not active. 733 // location bar even if the browser window is not active.
727 bool force_location_bar_focus_; 734 bool force_location_bar_focus_;
728 735
729 PendingFullscreenRequest fullscreen_request_; 736 PendingFullscreenRequest fullscreen_request_;
730 737
731 DISALLOW_COPY_AND_ASSIGN(BrowserView); 738 DISALLOW_COPY_AND_ASSIGN(BrowserView);
732 }; 739 };
733 740
734 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ 741 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_non_client_frame_view.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698