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_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 Loading... |
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 | |
165 // Returns true if the non-client view should render an avatar icon. | 161 // Returns true if the non-client view should render an avatar icon. |
166 virtual bool ShouldShowAvatar() const; | 162 virtual bool ShouldShowAvatar() const; |
167 | 163 |
168 // Handle the specified |accelerator| being pressed. | 164 // Handle the specified |accelerator| being pressed. |
169 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; | 165 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; |
170 | 166 |
171 // Provides the containing frame with the accelerator for the specified | 167 // Provides the containing frame with the accelerator for the specified |
172 // command id. This can be used to provide menu item shortcut hints etc. | 168 // command id. This can be used to provide menu item shortcut hints etc. |
173 // Returns true if an accelerator was found for the specified |cmd_id|, false | 169 // Returns true if an accelerator was found for the specified |cmd_id|, false |
174 // otherwise. | 170 // otherwise. |
175 bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator); | 171 bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator); |
176 | 172 |
177 // Shows the next app-modal dialog box, if there is one to be shown, or moves | 173 // Shows the next app-modal dialog box, if there is one to be shown, or moves |
178 // an existing showing one to the front. Returns true if one was shown or | 174 // an existing showing one to the front. Returns true if one was shown or |
179 // activated, false if none was shown. | 175 // activated, false if none was shown. |
180 bool ActivateAppModalDialog() const; | 176 bool ActivateAppModalDialog() const; |
181 | 177 |
182 // Returns the selected TabContents[Wrapper]. Used by our NonClientView's | 178 // Returns the selected TabContents[Wrapper]. Used by our NonClientView's |
183 // TabIconView::TabContentsProvider implementations. | 179 // TabIconView::TabContentsProvider implementations. |
184 // TODO(beng): exposing this here is a bit bogus, since it's only used to | 180 // TODO(beng): exposing this here is a bit bogus, since it's only used to |
185 // determine loading state. It'd be nicer if we could change this to be | 181 // determine loading state. It'd be nicer if we could change this to be |
186 // bool IsSelectedTabLoading() const; or something like that. We could even | 182 // bool IsSelectedTabLoading() const; or something like that. We could even |
187 // move it to a WindowDelegate subclass. | 183 // move it to a WindowDelegate subclass. |
188 TabContents* GetSelectedTabContents() const; | 184 TabContents* GetSelectedTabContents() const; |
189 TabContentsWrapper* GetSelectedTabContentsWrapper() const; | 185 TabContentsWrapper* GetSelectedTabContentsWrapper() const; |
190 | 186 |
191 // Retrieves the icon to use in the frame to indicate an OTR window. | 187 // Retrieves the icon to use in the frame to indicate an OTR window. |
192 SkBitmap GetOTRAvatarIcon() const; | 188 SkBitmap GetOTRAvatarIcon(); |
193 | |
194 // Retrieves the icon to use in the frame to indicate guest session. | |
195 SkBitmap GetGuestAvatarIcon() const; | |
196 | 189 |
197 #if defined(OS_WIN) | 190 #if defined(OS_WIN) |
198 // Called right before displaying the system menu to allow the BrowserView | 191 // Called right before displaying the system menu to allow the BrowserView |
199 // to add or delete entries. | 192 // to add or delete entries. |
200 void PrepareToRunSystemMenu(HMENU menu); | 193 void PrepareToRunSystemMenu(HMENU menu); |
201 #endif | 194 #endif |
202 | 195 |
203 // Returns true if the Browser object associated with this BrowserView is a | 196 // Returns true if the Browser object associated with this BrowserView is a |
204 // tabbed-type window (i.e. a browser window, not an app or popup). | 197 // tabbed-type window (i.e. a browser window, not an app or popup). |
205 bool IsBrowserTypeNormal() const { | 198 bool IsBrowserTypeNormal() const { |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 // If this flag is set then SetFocusToLocationBar() will set focus to the | 725 // If this flag is set then SetFocusToLocationBar() will set focus to the |
733 // location bar even if the browser window is not active. | 726 // location bar even if the browser window is not active. |
734 bool force_location_bar_focus_; | 727 bool force_location_bar_focus_; |
735 | 728 |
736 PendingFullscreenRequest fullscreen_request_; | 729 PendingFullscreenRequest fullscreen_request_; |
737 | 730 |
738 DISALLOW_COPY_AND_ASSIGN(BrowserView); | 731 DISALLOW_COPY_AND_ASSIGN(BrowserView); |
739 }; | 732 }; |
740 | 733 |
741 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ | 734 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ |
OLD | NEW |