OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_UI_VIEWS_IME_IME_WINDOW_FRAME_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_IME_IME_WINDOW_FRAME_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_IME_IME_WINDOW_FRAME_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_IME_IME_WINDOW_FRAME_VIEW_H_ |
7 | 7 |
8 #include "chrome/browser/ui/ime/ime_window.h" | 8 #include "chrome/browser/ui/ime/ime_window.h" |
9 #include "ui/views/controls/button/button.h" | 9 #include "ui/views/controls/button/button.h" |
10 #include "ui/views/window/non_client_view.h" | 10 #include "ui/views/window/non_client_view.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 public: | 25 public: |
26 // According to the UX spec, the follow-cursor window needs to have the title | 26 // According to the UX spec, the follow-cursor window needs to have the title |
27 // bar on the side instead of on the top (because the follow-cursor window is | 27 // bar on the side instead of on the top (because the follow-cursor window is |
28 // majorly used as suggestion list which can be shown in horizontal). | 28 // majorly used as suggestion list which can be shown in horizontal). |
29 // TODO(shuchen): locate the title bar on the right in the RTL case. | 29 // TODO(shuchen): locate the title bar on the right in the RTL case. |
30 ImeWindowFrameView(ImeWindowView* ime_window_view, | 30 ImeWindowFrameView(ImeWindowView* ime_window_view, |
31 ImeWindow::Mode mode); | 31 ImeWindow::Mode mode); |
32 ~ImeWindowFrameView() override; | 32 ~ImeWindowFrameView() override; |
33 | 33 |
34 void Init(); | 34 void Init(); |
35 void UpdateTitle(); | |
36 void UpdateIcon(); | 35 void UpdateIcon(); |
37 | 36 |
38 private: | 37 private: |
39 // views::NonClientFrameView: | 38 // views::NonClientFrameView: |
40 gfx::Rect GetBoundsForClientView() const override; | 39 gfx::Rect GetBoundsForClientView() const override; |
41 gfx::Rect GetWindowBoundsForClientBounds( | 40 gfx::Rect GetWindowBoundsForClientBounds( |
42 const gfx::Rect& client_bounds) const override; | 41 const gfx::Rect& client_bounds) const override; |
43 int NonClientHitTest(const gfx::Point& point) override; | 42 int NonClientHitTest(const gfx::Point& point) override; |
44 void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override; | 43 void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override; |
45 void ResetWindowControls() override; | 44 void ResetWindowControls() override; |
(...skipping 23 matching lines...) Expand all Loading... |
69 void PaintFrameBackground(gfx::Canvas* canvas); | 68 void PaintFrameBackground(gfx::Canvas* canvas); |
70 | 69 |
71 bool in_follow_cursor_mode() const { | 70 bool in_follow_cursor_mode() const { |
72 return mode_ == ImeWindow::FOLLOW_CURSOR; | 71 return mode_ == ImeWindow::FOLLOW_CURSOR; |
73 } | 72 } |
74 | 73 |
75 ImeWindowView* ime_window_view_; | 74 ImeWindowView* ime_window_view_; |
76 ImeWindow::Mode mode_; | 75 ImeWindow::Mode mode_; |
77 views::ImageButton* close_button_; | 76 views::ImageButton* close_button_; |
78 views::ImageView* title_icon_; | 77 views::ImageView* title_icon_; |
79 views::Label* title_label_; | |
80 | 78 |
81 DISALLOW_COPY_AND_ASSIGN(ImeWindowFrameView); | 79 DISALLOW_COPY_AND_ASSIGN(ImeWindowFrameView); |
82 }; | 80 }; |
83 | 81 |
84 } // namespace ui | 82 } // namespace ui |
85 | 83 |
86 #endif // CHROME_BROWSER_UI_VIEWS_IME_IME_WINDOW_FRAME_VIEW_H_ | 84 #endif // CHROME_BROWSER_UI_VIEWS_IME_IME_WINDOW_FRAME_VIEW_H_ |
OLD | NEW |