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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/search_ui.cc
diff --git a/chrome/browser/ui/search/search_ui.cc b/chrome/browser/ui/search/search_ui.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a52cce3714fdbd40c77c327e80a1ca126e60028d
--- /dev/null
+++ b/chrome/browser/ui/search/search_ui.cc
@@ -0,0 +1,31 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/search/search_ui.h"
+
+#include "ui/gfx/rect.h"
+#include "ui/gfx/size.h"
+
+namespace chrome {
+namespace search {
+
+const SkColor kNTPBackgroundColor = SkColorSetRGB(0xF5, 0xF5, 0xF5);
+const SkColor kResultsSeparatorColor = SkColorSetRGB(226, 226, 226);
+const SkColor kSearchBackgroundColor = SK_ColorWHITE;
+
+const int kOmniboxYPosition = 310;
+const int kSearchResultsHeight = 122;
+
+gfx::Rect GetNTPOmniboxBounds(const gfx::Size& web_contents_size) {
+ const double kNTPPageWidthRatio = 0.73f;
+ if (web_contents_size.IsEmpty())
+ return gfx::Rect();
+ int width = static_cast<int>(kNTPPageWidthRatio *
+ static_cast<double>(web_contents_size.width()));
+ int x = (web_contents_size.width() - width) / 2;
+ return gfx::Rect(x, kOmniboxYPosition, width, 0);
+}
+
+} // namespace search
+} // namespace chrome
« 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