| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 int GetShowState() const; | 65 int GetShowState() const; |
| 66 | 66 |
| 67 // Called by the frame to notify the BrowserView that it was moved, and that | 67 // Called by the frame to notify the BrowserView that it was moved, and that |
| 68 // any dependent popup windows should be repositioned. | 68 // any dependent popup windows should be repositioned. |
| 69 void WindowMoved(); | 69 void WindowMoved(); |
| 70 | 70 |
| 71 // Called by the frame to notify the BrowserView that a move or resize was | 71 // Called by the frame to notify the BrowserView that a move or resize was |
| 72 // initiated. | 72 // initiated. |
| 73 void WindowMoveOrResizeStarted(); | 73 void WindowMoveOrResizeStarted(); |
| 74 | 74 |
| 75 // Returns whether the browser can be resized _now_. This differs from | |
| 76 // CanResize() below, which returns whether the window is ever resizable in | |
| 77 // principle. | |
| 78 bool CanCurrentlyResize() const; | |
| 79 | |
| 80 // Returns the bounds of the toolbar, in BrowserView coordinates. | 75 // Returns the bounds of the toolbar, in BrowserView coordinates. |
| 81 gfx::Rect GetToolbarBounds() const; | 76 gfx::Rect GetToolbarBounds() const; |
| 82 | 77 |
| 83 // Returns the bounds of the content area, in the coordinates of the | 78 // Returns the bounds of the content area, in the coordinates of the |
| 84 // BrowserView's parent. | 79 // BrowserView's parent. |
| 85 gfx::Rect GetClientAreaBounds() const; | 80 gfx::Rect GetClientAreaBounds() const; |
| 86 | 81 |
| 87 // Returns true if the Find Bar should be rendered such that it appears to | 82 // Returns true if the Find Bar should be rendered such that it appears to |
| 88 // blend with the Bookmarks Bar. False if it should appear to blend with the | 83 // blend with the Bookmarks Bar. False if it should appear to blend with the |
| 89 // main Toolbar. The return value will vary depending on whether or not the | 84 // main Toolbar. The return value will vary depending on whether or not the |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 257 |
| 263 virtual std::string GetClassName() const; | 258 virtual std::string GetClassName() const; |
| 264 | 259 |
| 265 protected: | 260 protected: |
| 266 // Overridden from views::View: | 261 // Overridden from views::View: |
| 267 virtual void Layout(); | 262 virtual void Layout(); |
| 268 virtual void ViewHierarchyChanged(bool is_add, | 263 virtual void ViewHierarchyChanged(bool is_add, |
| 269 views::View* parent, | 264 views::View* parent, |
| 270 views::View* child); | 265 views::View* child); |
| 271 private: | 266 private: |
| 272 // Information saved before going into fullscreen mode, used to restore the | |
| 273 // window afterwards. | |
| 274 struct SavedWindowInfo { | |
| 275 bool maximized; | |
| 276 LONG style; | |
| 277 LONG ex_style; | |
| 278 RECT window_rect; | |
| 279 }; | |
| 280 | |
| 281 // Browser window related initializations. | 267 // Browser window related initializations. |
| 282 void Init(); | 268 void Init(); |
| 283 | 269 |
| 284 // Creates the system menu. | 270 // Creates the system menu. |
| 285 void InitSystemMenu(); | 271 void InitSystemMenu(); |
| 286 | 272 |
| 287 // Layout the TabStrip, returns the coordinate of the bottom of the TabStrip, | 273 // Layout the TabStrip, returns the coordinate of the bottom of the TabStrip, |
| 288 // for laying out subsequent controls. | 274 // for laying out subsequent controls. |
| 289 int LayoutTabStrip(); | 275 int LayoutTabStrip(); |
| 290 // Layout the following controls, starting at |top|, returns the coordinate | 276 // Layout the following controls, starting at |top|, returns the coordinate |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 | 370 |
| 385 // The Status information bubble that appears at the bottom of the window. | 371 // The Status information bubble that appears at the bottom of the window. |
| 386 scoped_ptr<StatusBubbleViews> status_bubble_; | 372 scoped_ptr<StatusBubbleViews> status_bubble_; |
| 387 | 373 |
| 388 // A mapping between accelerators and commands. | 374 // A mapping between accelerators and commands. |
| 389 scoped_ptr<std::map<views::Accelerator, int>> accelerator_table_; | 375 scoped_ptr<std::map<views::Accelerator, int>> accelerator_table_; |
| 390 | 376 |
| 391 // True if we have already been initialized. | 377 // True if we have already been initialized. |
| 392 bool initialized_; | 378 bool initialized_; |
| 393 | 379 |
| 394 // True if we're in fullscreen mode. | |
| 395 bool fullscreen_; | |
| 396 | |
| 397 // True if we should ignore requests to layout. This is set while toggling | 380 // True if we should ignore requests to layout. This is set while toggling |
| 398 // fullscreen mode on and off to reduce jankiness. | 381 // fullscreen mode on and off to reduce jankiness. |
| 399 bool ignore_layout_; | 382 bool ignore_layout_; |
| 400 | 383 |
| 401 // Saved window information from before entering fullscreen mode. | |
| 402 SavedWindowInfo saved_window_info_; | |
| 403 | |
| 404 scoped_ptr<FullscreenExitBubble> fullscreen_bubble_; | 384 scoped_ptr<FullscreenExitBubble> fullscreen_bubble_; |
| 405 | 385 |
| 406 // Lazily created representation of the system menu. | 386 // Lazily created representation of the system menu. |
| 407 scoped_ptr<Menu> system_menu_; | 387 scoped_ptr<Menu> system_menu_; |
| 408 | 388 |
| 409 // The default favicon image. | 389 // The default favicon image. |
| 410 static SkBitmap default_favicon_; | 390 static SkBitmap default_favicon_; |
| 411 | 391 |
| 412 // The OTR avatar image. | 392 // The OTR avatar image. |
| 413 static SkBitmap otr_avatar_; | 393 static SkBitmap otr_avatar_; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 434 // P13N stuff | 414 // P13N stuff |
| 435 #ifdef CHROME_PERSONALIZATION | 415 #ifdef CHROME_PERSONALIZATION |
| 436 FramePersonalization personalization_; | 416 FramePersonalization personalization_; |
| 437 bool personalization_enabled_; | 417 bool personalization_enabled_; |
| 438 #endif | 418 #endif |
| 439 | 419 |
| 440 DISALLOW_COPY_AND_ASSIGN(BrowserView); | 420 DISALLOW_COPY_AND_ASSIGN(BrowserView); |
| 441 }; | 421 }; |
| 442 | 422 |
| 443 #endif // CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ | 423 #endif // CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ |
| OLD | NEW |