| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_OPAQUE_BROWSER_FRAME_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/ui/views/frame/browser_frame.h" | 10 #include "chrome/browser/ui/views/frame/browser_frame.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // Used to allow subclasses to reserve height for other components they | 45 // Used to allow subclasses to reserve height for other components they |
| 46 // will add. The space is reserved below the ClientView. | 46 // will add. The space is reserved below the ClientView. |
| 47 virtual int GetReservedHeight() const; | 47 virtual int GetReservedHeight() const; |
| 48 virtual gfx::Rect GetBoundsForReservedArea() const; | 48 virtual gfx::Rect GetBoundsForReservedArea() const; |
| 49 | 49 |
| 50 // Returns the height of the entire nonclient top border, including the window | 50 // Returns the height of the entire nonclient top border, including the window |
| 51 // frame, any title area, and any connected client edge. If |restored| is | 51 // frame, any title area, and any connected client edge. If |restored| is |
| 52 // true, acts as if the window is restored regardless of the real mode. | 52 // true, acts as if the window is restored regardless of the real mode. |
| 53 int NonClientTopBorderHeight(bool restored) const; | 53 int NonClientTopBorderHeight(bool restored) const; |
| 54 | 54 |
| 55 // Allows a subclass to tweak the frame. Chromeos uses this to support | |
| 56 // drawing themes correctly. |theme_offset| is used to adjust the y offset | |
| 57 // of the theme frame bitmap, so they start at the right location. | |
| 58 // |theme_frame| will be used as theme frame bitmap. |left_corner| and | |
| 59 // |right_corner| will be used on the left and right of the tabstrip area | |
| 60 // as opposed to the theme frame. | |
| 61 virtual void ModifyMaximizedFramePainting( | |
| 62 int* theme_offset, | |
| 63 SkBitmap** theme_frame, | |
| 64 SkBitmap** left_corner, | |
| 65 SkBitmap** right_corner); | |
| 66 | |
| 67 // Overridden from views::NonClientFrameView: | 55 // Overridden from views::NonClientFrameView: |
| 68 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; | 56 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; |
| 69 virtual gfx::Rect GetWindowBoundsForClientBounds( | 57 virtual gfx::Rect GetWindowBoundsForClientBounds( |
| 70 const gfx::Rect& client_bounds) const OVERRIDE; | 58 const gfx::Rect& client_bounds) const OVERRIDE; |
| 71 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; | 59 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; |
| 72 virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) | 60 virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) |
| 73 OVERRIDE; | 61 OVERRIDE; |
| 74 virtual void ResetWindowControls() OVERRIDE; | 62 virtual void ResetWindowControls() OVERRIDE; |
| 75 virtual void UpdateWindowIcon() OVERRIDE; | 63 virtual void UpdateWindowIcon() OVERRIDE; |
| 76 | 64 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 163 |
| 176 content::NotificationRegistrar registrar_; | 164 content::NotificationRegistrar registrar_; |
| 177 | 165 |
| 178 // Background painter for the window frame. | 166 // Background painter for the window frame. |
| 179 scoped_ptr<views::FrameBackground> frame_background_; | 167 scoped_ptr<views::FrameBackground> frame_background_; |
| 180 | 168 |
| 181 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView); | 169 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView); |
| 182 }; | 170 }; |
| 183 | 171 |
| 184 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ | 172 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ |
| OLD | NEW |