| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // TODO(satorux): | 5 // TODO(satorux): |
| 6 // - Implement a scroll bar or an indicator showing where you are in the | 6 // - Implement a scroll bar or an indicator showing where you are in the |
| 7 // candidate window. | 7 // candidate window. |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 | 823 |
| 824 // Create the candidate window view. | 824 // Create the candidate window view. |
| 825 CreateView(); | 825 CreateView(); |
| 826 } | 826 } |
| 827 | 827 |
| 828 void CandidateWindowController::CreateView() { | 828 void CandidateWindowController::CreateView() { |
| 829 // Create a non-decorated frame. | 829 // Create a non-decorated frame. |
| 830 frame_.reset(views::Widget::CreatePopupWidget( | 830 frame_.reset(views::Widget::CreatePopupWidget( |
| 831 views::Widget::NotTransparent, | 831 views::Widget::NotTransparent, |
| 832 views::Widget::AcceptEvents, | 832 views::Widget::AcceptEvents, |
| 833 views::Widget::DeleteOnDestroy)); | 833 views::Widget::DeleteOnDestroy, |
| 834 views::Widget::MirrorOriginInRTL)); |
| 834 // The size is initially zero. | 835 // The size is initially zero. |
| 835 frame_->Init(NULL, gfx::Rect(0, 0)); | 836 frame_->Init(NULL, gfx::Rect(0, 0)); |
| 836 | 837 |
| 837 // Create the candidate window. | 838 // Create the candidate window. |
| 838 candidate_window_ = new CandidateWindowView(frame_.get()); | 839 candidate_window_ = new CandidateWindowView(frame_.get()); |
| 839 candidate_window_->Init(); | 840 candidate_window_->Init(); |
| 840 candidate_window_->AddObserver(this); | 841 candidate_window_->AddObserver(this); |
| 841 | 842 |
| 842 // Put the candidate window view on the frame. The frame is resized | 843 // Put the candidate window view on the frame. The frame is resized |
| 843 // later when the candidate window is shown. | 844 // later when the candidate window is shown. |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 // Create the candidate window controller. | 1022 // Create the candidate window controller. |
| 1022 chromeos::CandidateWindowController controller; | 1023 chromeos::CandidateWindowController controller; |
| 1023 controller.Init(); | 1024 controller.Init(); |
| 1024 | 1025 |
| 1025 // Start the main loop. | 1026 // Start the main loop. |
| 1026 views::AcceleratorHandler accelerator_handler; | 1027 views::AcceleratorHandler accelerator_handler; |
| 1027 MessageLoopForUI::current()->Run(&accelerator_handler); | 1028 MessageLoopForUI::current()->Run(&accelerator_handler); |
| 1028 | 1029 |
| 1029 return 0; | 1030 return 0; |
| 1030 } | 1031 } |
| OLD | NEW |