OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_VIEWS_FRAME_BROWSER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ |
6 #define CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ |
7 | 7 |
8 #include "chrome/browser/browser.h" | 8 #include "chrome/browser/browser.h" |
9 #include "chrome/browser/browser_window.h" | 9 #include "chrome/browser/browser_window.h" |
10 #include "chrome/browser/hang_monitor/hung_plugin_action.h" | 10 #include "chrome/browser/hang_monitor/hung_plugin_action.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 virtual void FlashFrame(); | 162 virtual void FlashFrame(); |
163 virtual void* GetNativeHandle(); | 163 virtual void* GetNativeHandle(); |
164 virtual BrowserWindowTesting* GetBrowserWindowTesting(); | 164 virtual BrowserWindowTesting* GetBrowserWindowTesting(); |
165 virtual StatusBubble* GetStatusBubble(); | 165 virtual StatusBubble* GetStatusBubble(); |
166 virtual void SelectedTabToolbarSizeChanged(bool is_animating); | 166 virtual void SelectedTabToolbarSizeChanged(bool is_animating); |
167 virtual void UpdateTitleBar(); | 167 virtual void UpdateTitleBar(); |
168 virtual void UpdateLoadingAnimations(bool should_animate); | 168 virtual void UpdateLoadingAnimations(bool should_animate); |
169 virtual void SetStarredState(bool is_starred); | 169 virtual void SetStarredState(bool is_starred); |
170 virtual gfx::Rect GetNormalBounds() const; | 170 virtual gfx::Rect GetNormalBounds() const; |
171 virtual bool IsMaximized() const; | 171 virtual bool IsMaximized() const; |
| 172 virtual void SetFullscreen(bool fullscreen); |
| 173 virtual bool IsFullscreen() const; |
172 virtual LocationBar* GetLocationBar() const; | 174 virtual LocationBar* GetLocationBar() const; |
173 virtual void SetFocusToLocationBar(); | 175 virtual void SetFocusToLocationBar(); |
174 virtual void UpdateStopGoState(bool is_loading); | 176 virtual void UpdateStopGoState(bool is_loading); |
175 virtual void UpdateToolbar(TabContents* contents, bool should_restore_state); | 177 virtual void UpdateToolbar(TabContents* contents, bool should_restore_state); |
176 virtual void FocusToolbar(); | 178 virtual void FocusToolbar(); |
177 virtual void DestroyBrowser(); | 179 virtual void DestroyBrowser(); |
178 virtual bool IsBookmarkBarVisible() const; | 180 virtual bool IsBookmarkBarVisible() const; |
179 virtual gfx::Rect GetRootWindowResizerRect() const; | 181 virtual gfx::Rect GetRootWindowResizerRect() const; |
180 virtual void ToggleBookmarkBar(); | 182 virtual void ToggleBookmarkBar(); |
181 virtual void ShowAboutChromeDialog(); | 183 virtual void ShowAboutChromeDialog(); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 views::View* child); | 254 views::View* child); |
253 // As long as ShouldForwardToTabStrip returns true, drag and drop methods | 255 // As long as ShouldForwardToTabStrip returns true, drag and drop methods |
254 // are forwarded to the tab strip. | 256 // are forwarded to the tab strip. |
255 virtual bool CanDrop(const OSExchangeData& data); | 257 virtual bool CanDrop(const OSExchangeData& data); |
256 virtual void OnDragEntered(const views::DropTargetEvent& event); | 258 virtual void OnDragEntered(const views::DropTargetEvent& event); |
257 virtual int OnDragUpdated(const views::DropTargetEvent& event); | 259 virtual int OnDragUpdated(const views::DropTargetEvent& event); |
258 virtual void OnDragExited(); | 260 virtual void OnDragExited(); |
259 virtual int OnPerformDrop(const views::DropTargetEvent& event); | 261 virtual int OnPerformDrop(const views::DropTargetEvent& event); |
260 | 262 |
261 private: | 263 private: |
| 264 // Information saved before going into fullscreen mode, used to restore the |
| 265 // window afterwards. |
| 266 struct SavedWindowInfo { |
| 267 LONG style; |
| 268 LONG ex_style; |
| 269 RECT window_rect; |
| 270 }; |
| 271 |
262 // Creates the system menu. | 272 // Creates the system menu. |
263 void InitSystemMenu(); | 273 void InitSystemMenu(); |
264 | 274 |
265 // Returns true if the event should be forwarded to the TabStrip. This | 275 // Returns true if the event should be forwarded to the TabStrip. This |
266 // returns true if y coordinate is less than the bottom of the tab strip, and | 276 // returns true if y coordinate is less than the bottom of the tab strip, and |
267 // is not over another child view. | 277 // is not over another child view. |
268 virtual bool ShouldForwardToTabStrip(const views::DropTargetEvent& event); | 278 virtual bool ShouldForwardToTabStrip(const views::DropTargetEvent& event); |
269 | 279 |
270 // Creates and returns a new DropTargetEvent in the coordinates of the | 280 // Creates and returns a new DropTargetEvent in the coordinates of the |
271 // TabStrip. | 281 // TabStrip. |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 | 377 |
368 // The Status information bubble that appears at the bottom of the window. | 378 // The Status information bubble that appears at the bottom of the window. |
369 scoped_ptr<StatusBubbleViews> status_bubble_; | 379 scoped_ptr<StatusBubbleViews> status_bubble_; |
370 | 380 |
371 // A mapping between accelerators and commands. | 381 // A mapping between accelerators and commands. |
372 scoped_ptr<std::map<views::Accelerator, int>> accelerator_table_; | 382 scoped_ptr<std::map<views::Accelerator, int>> accelerator_table_; |
373 | 383 |
374 // True if we have already been initialized. | 384 // True if we have already been initialized. |
375 bool initialized_; | 385 bool initialized_; |
376 | 386 |
| 387 // True if we're in fullscreen mode. |
| 388 bool fullscreen_; |
| 389 |
| 390 // Saved window information from before entering fullscreen mode. |
| 391 SavedWindowInfo saved_window_info_; |
| 392 |
377 // Lazily created representation of the system menu. | 393 // Lazily created representation of the system menu. |
378 scoped_ptr<Menu> system_menu_; | 394 scoped_ptr<Menu> system_menu_; |
379 | 395 |
380 // The default favicon image. | 396 // The default favicon image. |
381 static SkBitmap default_favicon_; | 397 static SkBitmap default_favicon_; |
382 | 398 |
383 // Initially set in CanDrop by invoking the same method on the TabStrip. | 399 // Initially set in CanDrop by invoking the same method on the TabStrip. |
384 bool can_drop_; | 400 bool can_drop_; |
385 | 401 |
386 // If true, drag and drop events are being forwarded to the tab strip. | 402 // If true, drag and drop events are being forwarded to the tab strip. |
(...skipping 29 matching lines...) Expand all Loading... |
416 // P13N stuff | 432 // P13N stuff |
417 #ifdef CHROME_PERSONALIZATION | 433 #ifdef CHROME_PERSONALIZATION |
418 FramePersonalization personalization_; | 434 FramePersonalization personalization_; |
419 bool personalization_enabled_; | 435 bool personalization_enabled_; |
420 #endif | 436 #endif |
421 | 437 |
422 DISALLOW_EVIL_CONSTRUCTORS(BrowserView); | 438 DISALLOW_EVIL_CONSTRUCTORS(BrowserView); |
423 }; | 439 }; |
424 | 440 |
425 #endif // CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ | 441 #endif // CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ |
OLD | NEW |