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

Unified Diff: athena/home/athena_start_page_view.cc

Issue 502583002: Exports gesture manager to a separate file and adds its unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: const Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « athena/home/DEPS ('k') | athena/home/home_card_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/home/athena_start_page_view.cc
diff --git a/athena/home/athena_start_page_view.cc b/athena/home/athena_start_page_view.cc
index 3bbcd44baf3f40423b0daf6c57b514730141dc7c..b5b8fb95564592f7836e33c4a18021d3772ca576 100644
--- a/athena/home/athena_start_page_view.cc
+++ b/athena/home/athena_start_page_view.cc
@@ -4,6 +4,7 @@
#include "athena/home/athena_start_page_view.h"
+#include "athena/home/home_card_constants.h"
#include "base/bind.h"
#include "base/strings/string_util.h"
#include "third_party/skia/include/core/SkPaint.h"
@@ -42,9 +43,6 @@ const int kSearchBoxCornerRadius = 2;
const int kSearchBoxWidth = 490;
const int kSearchBoxHeight = 40;
-// The preferred height for VISIBLE_BOTTOM state.
-const int kPreferredHeightBottom = 100;
-
class PlaceHolderButton : public views::ImageButton,
public views::ButtonListener {
public:
@@ -214,7 +212,7 @@ void AthenaStartPageView::LayoutSearchResults(bool should_show_search_results) {
search_results_view_->layer()->GetTargetVisibility()) {
return;
}
- if (GetContentsBounds().height() <= kPreferredHeightBottom) {
+ if (GetContentsBounds().height() <= kHomeCardHeight) {
search_results_view_->SetVisible(false);
Layout();
return;
@@ -281,7 +279,7 @@ void AthenaStartPageView::Layout() {
gfx::Rect bounds = GetContentsBounds();
search_results_view_->SetVisible(false);
- if (bounds.height() <= kPreferredHeightBottom) {
+ if (bounds.height() <= kHomeCardHeight) {
logo_->SetVisible(false);
gfx::Rect icon_bounds(app_icon_container_->GetPreferredSize());
icon_bounds.set_x(bounds.x() + kIconMargin);
@@ -296,7 +294,7 @@ void AthenaStartPageView::Layout() {
search_box_container_->SetBounds(
icon_bounds.right(), bounds.y(),
- control_bounds.x() - icon_bounds.right(), kPreferredHeightBottom);
+ control_bounds.x() - icon_bounds.right(), kHomeCardHeight);
set_background(views::Background::CreateSolidBackground(
255, 255, 255, 255 * 0.9));
« no previous file with comments | « athena/home/DEPS ('k') | athena/home/home_card_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698