Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/timer.h" | 10 #include "base/timer.h" |
| 11 #include "chrome/browser/chromeos/input_method/ibus_ui_controller.h" | 11 #include "chrome/browser/chromeos/input_method/ibus_ui_controller.h" |
| 12 #include "ui/views/view.h" | 12 #include "ui/views/view.h" |
| 13 | 13 |
|
Yusuke Sato
2012/06/08 02:22:42
namespace gfx { class Font; }
horo
2012/06/08 03:01:12
Done.
| |
| 14 namespace chromeos { | 14 namespace chromeos { |
| 15 namespace input_method { | 15 namespace input_method { |
| 16 | 16 |
| 17 class CandidateView; | 17 class CandidateView; |
| 18 class InfolistView; | 18 class InfolistView; |
| 19 class InformationTextArea; | 19 class InformationTextArea; |
| 20 class HidableArea; | 20 class HidableArea; |
| 21 | 21 |
| 22 // CandidateWindowView is the main container of the candidate window UI. | 22 // CandidateWindowView is the main container of the candidate window UI. |
| 23 class CandidateWindowView : public views::View { | 23 class CandidateWindowView : public views::View { |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 223 public: | 223 public: |
| 224 InfolistWindowView(views::Widget* parent_frame, | 224 InfolistWindowView(views::Widget* parent_frame, |
| 225 views::Widget* candidate_window_frame); | 225 views::Widget* candidate_window_frame); |
| 226 virtual ~InfolistWindowView(); | 226 virtual ~InfolistWindowView(); |
| 227 void Init(); | 227 void Init(); |
| 228 void Show(); | 228 void Show(); |
| 229 void DelayShow(unsigned int milliseconds); | 229 void DelayShow(unsigned int milliseconds); |
| 230 void Hide(); | 230 void Hide(); |
| 231 void DelayHide(unsigned int milliseconds); | 231 void DelayHide(unsigned int milliseconds); |
| 232 void UpdateCandidates(const InputMethodLookupTable& lookup_table); | 232 void UpdateCandidates(const InputMethodLookupTable& lookup_table); |
| 233 | |
| 234 void ResizeAndMoveParentFrame(); | 233 void ResizeAndMoveParentFrame(); |
| 234 gfx::Font GetTitleFont(); | |
|
Yusuke Sato
2012/06/08 02:22:42
const; ?
Yusuke Sato
2012/06/08 02:22:42
I briefly checked ui/gfx/platform_font_pango.h. Lo
horo
2012/06/08 03:01:12
Done.
horo
2012/06/08 03:01:12
Copying gfx::Font by value does not causes copying
| |
| 235 gfx::Font GetDescriptionFont(); | |
|
Yusuke Sato
2012/06/08 02:22:42
ditto.
horo
2012/06/08 03:01:12
Done.
| |
| 235 | 236 |
| 236 protected: | 237 protected: |
| 237 // Override View::VisibilityChanged() | 238 // Override View::VisibilityChanged() |
| 238 virtual void VisibilityChanged(View* starting_from, bool is_visible) OVERRIDE; | 239 virtual void VisibilityChanged(View* starting_from, bool is_visible) OVERRIDE; |
| 239 | 240 |
| 240 // Override View::OnBoundsChanged() | 241 // Override View::OnBoundsChanged() |
| 241 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; | 242 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; |
| 242 | 243 |
| 243 private: | 244 private: |
| 244 FRIEND_TEST_ALL_PREFIXES(InfolistWindowViewTest, ShouldUpdateViewTest); | 245 FRIEND_TEST_ALL_PREFIXES(InfolistWindowViewTest, ShouldUpdateViewTest); |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 262 std::vector<InfolistView*> infolist_views_; | 263 std::vector<InfolistView*> infolist_views_; |
| 263 | 264 |
| 264 bool visible_; | 265 bool visible_; |
| 265 | 266 |
| 266 base::OneShotTimer<InfolistWindowView> show_hide_timer_; | 267 base::OneShotTimer<InfolistWindowView> show_hide_timer_; |
| 267 | 268 |
| 268 static bool ShouldUpdateView( | 269 static bool ShouldUpdateView( |
| 269 const mozc::commands::InformationList* old_usages, | 270 const mozc::commands::InformationList* old_usages, |
| 270 const mozc::commands::InformationList* new_usages); | 271 const mozc::commands::InformationList* new_usages); |
| 271 | 272 |
| 273 // Information title font | |
| 274 scoped_ptr<gfx::Font> title_font_; | |
| 275 // Information description font | |
| 276 scoped_ptr<gfx::Font> description_font_; | |
| 277 | |
| 272 DISALLOW_COPY_AND_ASSIGN(InfolistWindowView); | 278 DISALLOW_COPY_AND_ASSIGN(InfolistWindowView); |
| 273 }; | 279 }; |
| 274 | 280 |
| 275 } // namespace input_method | 281 } // namespace input_method |
| 276 } // namespace chromeos | 282 } // namespace chromeos |
| 277 | 283 |
| 278 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_ | 284 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_ |
| OLD | NEW |