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

Side by Side Diff: ui/app_list/views/start_page_view.cc

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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 | « ui/app_list/views/speech_view.cc ('k') | ui/app_list/views/top_icon_animation_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "ui/app_list/views/start_page_view.h" 5 #include "ui/app_list/views/start_page_view.h"
6 6
7 #include "content/public/browser/web_contents.h" 7 #include "content/public/browser/web_contents.h"
8 #include "ui/app_list/app_list_constants.h" 8 #include "ui/app_list/app_list_constants.h"
9 #include "ui/app_list/views/app_list_main_view.h" 9 #include "ui/app_list/views/app_list_main_view.h"
10 #include "ui/gfx/canvas.h" 10 #include "ui/gfx/canvas.h"
(...skipping 16 matching lines...) Expand all
27 27
28 // A button that is the placeholder for the search bar in the start page view. 28 // A button that is the placeholder for the search bar in the start page view.
29 class BarPlaceholderButton : public views::CustomButton { 29 class BarPlaceholderButton : public views::CustomButton {
30 public: 30 public:
31 explicit BarPlaceholderButton(views::ButtonListener* listener) 31 explicit BarPlaceholderButton(views::ButtonListener* listener)
32 : views::CustomButton(listener) {} 32 : views::CustomButton(listener) {}
33 33
34 virtual ~BarPlaceholderButton() {} 34 virtual ~BarPlaceholderButton() {}
35 35
36 // Overridden from views::View: 36 // Overridden from views::View:
37 virtual gfx::Size GetPreferredSize() OVERRIDE { 37 virtual gfx::Size GetPreferredSize() const OVERRIDE {
38 return gfx::Size(kBarPlaceholderWidth, kBarPlaceholderHeight); 38 return gfx::Size(kBarPlaceholderWidth, kBarPlaceholderHeight);
39 } 39 }
40 40
41 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { 41 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
42 PaintButton( 42 PaintButton(
43 canvas, 43 canvas,
44 state() == STATE_HOVERED ? kPagerHoverColor : kPagerNormalColor); 44 state() == STATE_HOVERED ? kPagerHoverColor : kPagerNormalColor);
45 } 45 }
46 46
47 private: 47 private:
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 instant_container_->SetVisible(true); 88 instant_container_->SetVisible(true);
89 } 89 }
90 90
91 void StartPageView::ButtonPressed(views::Button* sender, 91 void StartPageView::ButtonPressed(views::Button* sender,
92 const ui::Event& event) { 92 const ui::Event& event) {
93 app_list_main_view_->OnStartPageSearchButtonPressed(); 93 app_list_main_view_->OnStartPageSearchButtonPressed();
94 instant_container_->SetVisible(false); 94 instant_container_->SetVisible(false);
95 } 95 }
96 96
97 } // namespace app_list 97 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/speech_view.cc ('k') | ui/app_list/views/top_icon_animation_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698