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 #include "chrome/browser/ui/views/ime/ime_window_view.h" | 5 #include "chrome/browser/ui/views/ime/ime_window_view.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/ui/views/ime/ime_window_frame_view.h" | 8 #include "chrome/browser/ui/views/ime/ime_window_frame_view.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "ui/gfx/image/image.h" | 10 #include "ui/gfx/image/image.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 params.visible_on_all_workspaces = false; | 43 params.visible_on_all_workspaces = false; |
44 params.bounds = bounds; | 44 params.bounds = bounds; |
45 window_->set_focus_on_creation(false); | 45 window_->set_focus_on_creation(false); |
46 window_->set_frame_type(views::Widget::FRAME_TYPE_FORCE_CUSTOM); | 46 window_->set_frame_type(views::Widget::FRAME_TYPE_FORCE_CUSTOM); |
47 window_->Init(params); | 47 window_->Init(params); |
48 window_->UpdateWindowTitle(); | 48 window_->UpdateWindowTitle(); |
49 window_->UpdateWindowIcon(); | 49 window_->UpdateWindowIcon(); |
50 | 50 |
51 web_view_ = new views::WebView(nullptr); | 51 web_view_ = new views::WebView(nullptr); |
52 web_view_->SetWebContents(contents); | 52 web_view_->SetWebContents(contents); |
53 web_view_->SetFocusable(false); | 53 web_view_->SetFocusBehavior(views::View::FocusBehavior::NEVER); |
54 AddChildView(web_view_); | 54 AddChildView(web_view_); |
55 | 55 |
56 SetLayoutManager(new views::FillLayout); | 56 SetLayoutManager(new views::FillLayout); |
57 Layout(); | 57 Layout(); |
58 | 58 |
59 // TODO(shuchen): supports auto cursor/composition aligning for | 59 // TODO(shuchen): supports auto cursor/composition aligning for |
60 // follow-cursor window. | 60 // follow-cursor window. |
61 } | 61 } |
62 | 62 |
63 ImeWindowView::~ImeWindowView() {} | 63 ImeWindowView::~ImeWindowView() {} |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 ImeWindowFrameView* ImeWindowView::GetFrameView() const { | 193 ImeWindowFrameView* ImeWindowView::GetFrameView() const { |
194 return static_cast<ImeWindowFrameView*>( | 194 return static_cast<ImeWindowFrameView*>( |
195 window_->non_client_view()->frame_view()); | 195 window_->non_client_view()->frame_view()); |
196 } | 196 } |
197 | 197 |
198 void ImeWindowView::EndDragging() { | 198 void ImeWindowView::EndDragging() { |
199 dragging_state_ = DragState::NO_DRAG; | 199 dragging_state_ = DragState::NO_DRAG; |
200 } | 200 } |
201 | 201 |
202 } // namespace ui | 202 } // namespace ui |
OLD | NEW |