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

Side by Side Diff: chrome/browser/ui/views/frame/contents_container.h

Issue 10915217: Hook up SetInstantPreviewHeight for ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor fixes. Created 8 years, 3 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) 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_CONTENTS_CONTAINER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_
7 7
8 #include "ui/views/view.h" 8 #include "ui/views/view.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 27 matching lines...) Expand all
38 38
39 // Makes the preview view the active view and nulls out the old active view. 39 // Makes the preview view the active view and nulls out the old active view.
40 // It's assumed the caller will delete or remove the old active view 40 // It's assumed the caller will delete or remove the old active view
41 // separately. 41 // separately.
42 void MakePreviewContentsActiveContents(); 42 void MakePreviewContentsActiveContents();
43 43
44 // Sets the preview view. This does not delete the old. 44 // Sets the preview view. This does not delete the old.
45 void SetPreview(views::WebView* preview, 45 void SetPreview(views::WebView* preview,
46 content::WebContents* preview_web_contents); 46 content::WebContents* preview_web_contents);
47 47
48 // Sets the desired height of the current preview view.
49 void SetPreviewHeight(int value, bool is_percent);
50
48 content::WebContents* preview_web_contents() const { 51 content::WebContents* preview_web_contents() const {
49 return preview_web_contents_; 52 return preview_web_contents_;
50 } 53 }
51 54
52 // Sets the active top margin. 55 // Sets the active top margin.
53 void SetActiveTopMargin(int margin); 56 void SetActiveTopMargin(int margin);
54 57
55 // Returns the bounds of the preview. If the preview isn't active this 58 // Returns the bounds of the preview. If the preview isn't active this
56 // retuns the bounds the preview would be shown at. 59 // retuns the bounds the preview would be shown at.
57 gfx::Rect GetPreviewBounds(); 60 gfx::Rect GetPreviewBounds();
58 61
59 // View overrides: 62 // View overrides:
60 virtual void Layout() OVERRIDE; 63 virtual void Layout() OVERRIDE;
61 virtual std::string GetClassName() const OVERRIDE; 64 virtual std::string GetClassName() const OVERRIDE;
62 65
63 private: 66 private:
64 views::WebView* active_; 67 views::WebView* active_;
65 views::View* overlay_; 68 views::View* overlay_;
66 views::WebView* preview_; 69 views::WebView* preview_;
67 content::WebContents* preview_web_contents_; 70 content::WebContents* preview_web_contents_;
68 71
69 // The margin between the top and the active view. This is used to make the 72 // The margin between the top and the active view. This is used to make the
70 // preview overlap the bookmark bar on the new tab page. 73 // preview overlap the bookmark bar on the new tab page.
71 int active_top_margin_; 74 int active_top_margin_;
72 75
76 // The desired height of the preview. If negative or greater than height(),
77 // the preview will fill the container.
78 int preview_height_;
79
73 DISALLOW_COPY_AND_ASSIGN(ContentsContainer); 80 DISALLOW_COPY_AND_ASSIGN(ContentsContainer);
74 }; 81 };
75 82
76 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_ 83 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698