| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/input_method/candidate_window.h" | 5 #include "chrome/browser/chromeos/input_method/candidate_window.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1666 // initial connection change. | 1666 // initial connection change. |
| 1667 ibus_ui_controller_->AddObserver(this); | 1667 ibus_ui_controller_->AddObserver(this); |
| 1668 ibus_ui_controller_->Connect(); | 1668 ibus_ui_controller_->Connect(); |
| 1669 return true; | 1669 return true; |
| 1670 } | 1670 } |
| 1671 | 1671 |
| 1672 void CandidateWindowController::Impl::CreateView() { | 1672 void CandidateWindowController::Impl::CreateView() { |
| 1673 // Create a non-decorated frame. | 1673 // Create a non-decorated frame. |
| 1674 frame_.reset(new views::Widget); | 1674 frame_.reset(new views::Widget); |
| 1675 // The size is initially zero. | 1675 // The size is initially zero. |
| 1676 frame_->Init( | 1676 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); |
| 1677 views::Widget::InitParams(views::Widget::InitParams::TYPE_POPUP)); | 1677 // Show the candidate window always on top |
| 1678 params.keep_on_top = true; |
| 1679 frame_->Init(params); |
| 1678 | 1680 |
| 1679 // Create the candidate window. | 1681 // Create the candidate window. |
| 1680 candidate_window_ = new CandidateWindowView(frame_.get()); | 1682 candidate_window_ = new CandidateWindowView(frame_.get()); |
| 1681 candidate_window_->Init(); | 1683 candidate_window_->Init(); |
| 1682 candidate_window_->AddObserver(this); | 1684 candidate_window_->AddObserver(this); |
| 1683 | 1685 |
| 1684 frame_->SetContentsView(candidate_window_); | 1686 frame_->SetContentsView(candidate_window_); |
| 1685 | 1687 |
| 1686 | 1688 |
| 1687 // Create the infolist window. | 1689 // Create the infolist window. |
| 1688 infolist_frame_.reset(new views::Widget); | 1690 infolist_frame_.reset(new views::Widget); |
| 1689 infolist_frame_->Init( | 1691 infolist_frame_->Init(params); |
| 1690 views::Widget::InitParams(views::Widget::InitParams::TYPE_POPUP)); | |
| 1691 infolist_window_ = new InfolistWindowView( | 1692 infolist_window_ = new InfolistWindowView( |
| 1692 infolist_frame_.get(), frame_.get()); | 1693 infolist_frame_.get(), frame_.get()); |
| 1693 infolist_window_->Init(); | 1694 infolist_window_->Init(); |
| 1694 infolist_frame_->SetContentsView(infolist_window_); | 1695 infolist_frame_->SetContentsView(infolist_window_); |
| 1695 } | 1696 } |
| 1696 | 1697 |
| 1697 CandidateWindowController::Impl::Impl() | 1698 CandidateWindowController::Impl::Impl() |
| 1698 : ibus_ui_controller_(IBusUiController::Create()), | 1699 : ibus_ui_controller_(IBusUiController::Create()), |
| 1699 candidate_window_(NULL), | 1700 candidate_window_(NULL), |
| 1700 infolist_window_(NULL) { | 1701 infolist_window_(NULL) { |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1821 CandidateWindowController::~CandidateWindowController() { | 1822 CandidateWindowController::~CandidateWindowController() { |
| 1822 delete impl_; | 1823 delete impl_; |
| 1823 } | 1824 } |
| 1824 | 1825 |
| 1825 bool CandidateWindowController::Init() { | 1826 bool CandidateWindowController::Init() { |
| 1826 return impl_->Init(); | 1827 return impl_->Init(); |
| 1827 } | 1828 } |
| 1828 | 1829 |
| 1829 } // namespace input_method | 1830 } // namespace input_method |
| 1830 } // namespace chromeos | 1831 } // namespace chromeos |
| OLD | NEW |