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

Side by Side Diff: ui/app_list/views/speech_view.h

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/search_result_view.cc ('k') | ui/app_list/views/speech_view.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef UI_APP_LIST_VIEWS_SPEECH_VIEW_H_ 5 #ifndef UI_APP_LIST_VIEWS_SPEECH_VIEW_H_
6 #define UI_APP_LIST_VIEWS_SPEECH_VIEW_H_ 6 #define UI_APP_LIST_VIEWS_SPEECH_VIEW_H_
7 7
8 #include "ui/app_list/speech_ui_model_observer.h" 8 #include "ui/app_list/speech_ui_model_observer.h"
9 #include "ui/views/controls/button/button.h" 9 #include "ui/views/controls/button/button.h"
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
(...skipping 16 matching lines...) Expand all
27 public SpeechUIModelObserver { 27 public SpeechUIModelObserver {
28 public: 28 public:
29 explicit SpeechView(AppListViewDelegate* delegate); 29 explicit SpeechView(AppListViewDelegate* delegate);
30 virtual ~SpeechView(); 30 virtual ~SpeechView();
31 31
32 // Reset to the original state. 32 // Reset to the original state.
33 void Reset(); 33 void Reset();
34 34
35 // Overridden from views::View: 35 // Overridden from views::View:
36 virtual void Layout() OVERRIDE; 36 virtual void Layout() OVERRIDE;
37 virtual gfx::Size GetPreferredSize() OVERRIDE; 37 virtual gfx::Size GetPreferredSize() const OVERRIDE;
38 38
39 private: 39 private:
40 int GetIndicatorRadius(uint8 level); 40 int GetIndicatorRadius(uint8 level);
41 41
42 // Overridden from views::ButtonListener: 42 // Overridden from views::ButtonListener:
43 virtual void ButtonPressed(views::Button* sender, 43 virtual void ButtonPressed(views::Button* sender,
44 const ui::Event& event) OVERRIDE; 44 const ui::Event& event) OVERRIDE;
45 45
46 // Overridden from SpeechUIModelObserver: 46 // Overridden from SpeechUIModelObserver:
47 virtual void OnSpeechSoundLevelChanged(uint8 level) OVERRIDE; 47 virtual void OnSpeechSoundLevelChanged(uint8 level) OVERRIDE;
48 virtual void OnSpeechResult(const base::string16& result, 48 virtual void OnSpeechResult(const base::string16& result,
49 bool is_final) OVERRIDE; 49 bool is_final) OVERRIDE;
50 virtual void OnSpeechRecognitionStateChanged( 50 virtual void OnSpeechRecognitionStateChanged(
51 SpeechRecognitionState new_state) OVERRIDE; 51 SpeechRecognitionState new_state) OVERRIDE;
52 52
53 AppListViewDelegate* delegate_; 53 AppListViewDelegate* delegate_;
54 54
55 views::ImageView* logo_; 55 views::ImageView* logo_;
56 views::View* indicator_; 56 views::View* indicator_;
57 views::ImageButton* mic_button_; 57 views::ImageButton* mic_button_;
58 views::Label* speech_result_; 58 views::Label* speech_result_;
59 scoped_ptr<views::BoundsAnimator> indicator_animator_; 59 scoped_ptr<views::BoundsAnimator> indicator_animator_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(SpeechView); 61 DISALLOW_COPY_AND_ASSIGN(SpeechView);
62 }; 62 };
63 63
64 } // namespace app_list 64 } // namespace app_list
65 65
66 #endif // UI_APP_LIST_VIEWS_SPEECH_VIEW_H_ 66 #endif // UI_APP_LIST_VIEWS_SPEECH_VIEW_H_
OLDNEW
« no previous file with comments | « ui/app_list/views/search_result_view.cc ('k') | ui/app_list/views/speech_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698