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

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: Removed UI stuff from SearchModel 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
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..f7c81c030cf4c73c7c1e93820165ed1f9c192354
--- /dev/null
+++ b/chrome/browser/ui/search/search_ui.cc
@@ -0,0 +1,28 @@
+// 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"
+
+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

Powered by Google App Engine
This is Rietveld 408576698