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

Side by Side Diff: chrome/browser/ui/search/search_ui.cc

Issue 10644002: Add core plumbing for Instant Extended work (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address pkasting, tfarina, and remaining nits. Created 8 years, 6 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
« no previous file with comments | « chrome/browser/ui/search/search_ui.h ('k') | chrome/browser/ui/tab_contents/tab_contents.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/search/search_ui.h"
6
7 #include "ui/gfx/rect.h"
8 #include "ui/gfx/size.h"
9
10 namespace chrome {
11 namespace search {
12
13 const SkColor kNTPBackgroundColor = SkColorSetRGB(0xF5, 0xF5, 0xF5);
14 const SkColor kResultsSeparatorColor = SkColorSetRGB(226, 226, 226);
15 const SkColor kSearchBackgroundColor = SK_ColorWHITE;
16
17 const int kOmniboxYPosition = 310;
18 const int kSearchResultsHeight = 122;
19
20 gfx::Rect GetNTPOmniboxBounds(const gfx::Size& web_contents_size) {
21 const double kNTPPageWidthRatio = 0.73f;
22 if (web_contents_size.IsEmpty())
23 return gfx::Rect();
24 int width = static_cast<int>(kNTPPageWidthRatio *
25 static_cast<double>(web_contents_size.width()));
26 int x = (web_contents_size.width() - width) / 2;
27 return gfx::Rect(x, kOmniboxYPosition, width, 0);
28 }
29
30 } // namespace search
31 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_ui.h ('k') | chrome/browser/ui/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698