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

Side by Side Diff: chrome/browser/views/detachable_toolbar_view.h

Issue 3137019: Fix numerous alignment problems, both horizontal and vertical, in drawing the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_DETACHABLE_TOOLBAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_VIEWS_DETACHABLE_TOOLBAR_VIEW_H_
6 #define CHROME_BROWSER_VIEWS_DETACHABLE_TOOLBAR_VIEW_H_ 6 #define CHROME_BROWSER_VIEWS_DETACHABLE_TOOLBAR_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/views/accessible_toolbar_view.h" 9 #include "chrome/browser/views/accessible_toolbar_view.h"
10 10
(...skipping 14 matching lines...) Expand all
25 25
26 // Whether the view is currently detached from the Chrome frame. 26 // Whether the view is currently detached from the Chrome frame.
27 virtual bool IsDetached() const = 0; 27 virtual bool IsDetached() const = 0;
28 28
29 // Gets the current state of the resize animation (show/hide). 29 // Gets the current state of the resize animation (show/hide).
30 virtual double GetAnimationValue() const = 0; 30 virtual double GetAnimationValue() const = 0;
31 31
32 // Gets the current amount of overlap atop the browser toolbar. 32 // Gets the current amount of overlap atop the browser toolbar.
33 virtual int GetToolbarOverlap() const = 0; 33 virtual int GetToolbarOverlap() const = 0;
34 34
35 // Paint the background (including the theme image behind content area) when 35 // Paints the background (including the theme image behind content area) when
36 // in bar/shelf is attached to the Chrome frame. 36 // the bar/shelf is attached to the top toolbar. |background_origin| is the
37 // origin to use for painting the theme image.
37 static void PaintBackgroundAttachedMode(gfx::Canvas* canvas, 38 static void PaintBackgroundAttachedMode(gfx::Canvas* canvas,
38 views::View* view); 39 views::View* view,
40 const gfx::Point& background_origin);
39 41
40 // Calculate the rect for the content area of the bar/shelf. This is only 42 // Calculate the rect for the content area of the bar/shelf. This is only
41 // needed when the bar/shelf is detached from the Chrome frame (otherwise the 43 // needed when the bar/shelf is detached from the Chrome frame (otherwise the
42 // content area is the whole area of the bar/shelf. When detached, however, 44 // content area is the whole area of the bar/shelf. When detached, however,
43 // only a small round rectangle is for drawing our content on. This calculates 45 // only a small round rectangle is for drawing our content on. This calculates
44 // how big this area is, where it is located within the shelf and how round 46 // how big this area is, where it is located within the shelf and how round
45 // the edges should be. 47 // the edges should be.
46 static void CalculateContentArea(double animation_state, 48 static void CalculateContentArea(double animation_state,
47 double horizontal_padding, 49 double horizontal_padding,
48 double vertical_padding, 50 double vertical_padding,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 int vertical_padding, 82 int vertical_padding,
81 const SkColor& top_color, 83 const SkColor& top_color,
82 const SkColor& middle_color, 84 const SkColor& middle_color,
83 const SkColor& bottom_color); 85 const SkColor& bottom_color);
84 86
85 private: 87 private:
86 DISALLOW_COPY_AND_ASSIGN(DetachableToolbarView); 88 DISALLOW_COPY_AND_ASSIGN(DetachableToolbarView);
87 }; 89 };
88 90
89 #endif // CHROME_BROWSER_VIEWS_DETACHABLE_TOOLBAR_VIEW_H_ 91 #endif // CHROME_BROWSER_VIEWS_DETACHABLE_TOOLBAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/frame/normal_browser_frame_view.cc ('k') | chrome/browser/views/detachable_toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698