Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: chrome/browser/ui/views/ime/ime_window_view.cc

Issue 2390953004: WidgetDelegateView is its own contents view. (Closed)
Patch Set: another minor fix Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 } 138 }
139 139
140 void ImeWindowView::OnTitlebarPointerCaptureLost() { 140 void ImeWindowView::OnTitlebarPointerCaptureLost() {
141 if (dragging_state_ == DragState::ACTIVE_DRAG) { 141 if (dragging_state_ == DragState::ACTIVE_DRAG) {
142 GetWidget()->SetBounds(bounds_on_drag_start_); 142 GetWidget()->SetBounds(bounds_on_drag_start_);
143 EndDragging(); 143 EndDragging();
144 } 144 }
145 } 145 }
146 146
147 views::View* ImeWindowView::GetContentsView() {
148 return this;
149 }
150
151 views::NonClientFrameView* ImeWindowView::CreateNonClientFrameView( 147 views::NonClientFrameView* ImeWindowView::CreateNonClientFrameView(
152 views::Widget* widget) { 148 views::Widget* widget) {
153 ImeWindowFrameView* frame_view = new ImeWindowFrameView( 149 ImeWindowFrameView* frame_view = new ImeWindowFrameView(
154 this, ime_window_->mode()); 150 this, ime_window_->mode());
155 frame_view->Init(); 151 frame_view->Init();
156 return frame_view; 152 return frame_view;
157 } 153 }
158 154
159 bool ImeWindowView::CanActivate() const { 155 bool ImeWindowView::CanActivate() const {
160 return false; 156 return false;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 ImeWindowFrameView* ImeWindowView::GetFrameView() const { 189 ImeWindowFrameView* ImeWindowView::GetFrameView() const {
194 return static_cast<ImeWindowFrameView*>( 190 return static_cast<ImeWindowFrameView*>(
195 window_->non_client_view()->frame_view()); 191 window_->non_client_view()->frame_view());
196 } 192 }
197 193
198 void ImeWindowView::EndDragging() { 194 void ImeWindowView::EndDragging() {
199 dragging_state_ = DragState::NO_DRAG; 195 dragging_state_ = DragState::NO_DRAG;
200 } 196 }
201 197
202 } // namespace ui 198 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698