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

Side by Side Diff: ui/views/widget/native_widget_aura.cc

Issue 10827454: Move more methods from NWW to HWNDMessageHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | ui/views/widget/native_widget_private.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/activation_change_observer.h" 10 #include "ui/aura/client/activation_change_observer.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 } 332 }
333 333
334 bool NativeWidgetAura::HasCapture() const { 334 bool NativeWidgetAura::HasCapture() const {
335 return window_->HasCapture(); 335 return window_->HasCapture();
336 } 336 }
337 337
338 InputMethod* NativeWidgetAura::CreateInputMethod() { 338 InputMethod* NativeWidgetAura::CreateInputMethod() {
339 aura::RootWindow* root_window = window_->GetRootWindow(); 339 aura::RootWindow* root_window = window_->GetRootWindow();
340 ui::InputMethod* host = 340 ui::InputMethod* host =
341 root_window->GetProperty(aura::client::kRootWindowInputMethodKey); 341 root_window->GetProperty(aura::client::kRootWindowInputMethodKey);
342 InputMethod* input_method = new InputMethodBridge(this, host); 342 return new InputMethodBridge(this, host);
343 input_method->Init(GetWidget()); 343 }
344 return input_method; 344
345 internal::InputMethodDelegate* NativeWidgetAura::GetInputMethodDelegate() {
346 return this;
345 } 347 }
346 348
347 void NativeWidgetAura::CenterWindow(const gfx::Size& size) { 349 void NativeWidgetAura::CenterWindow(const gfx::Size& size) {
348 gfx::Rect parent_bounds(window_->parent()->GetBoundsInRootWindow()); 350 gfx::Rect parent_bounds(window_->parent()->GetBoundsInRootWindow());
349 // When centering window, we take the intersection of the host and 351 // When centering window, we take the intersection of the host and
350 // the parent. We assume the root window represents the visible 352 // the parent. We assume the root window represents the visible
351 // rect of a single screen. 353 // rect of a single screen.
352 gfx::Rect work_area = 354 gfx::Rect work_area =
353 gfx::Screen::GetDisplayNearestWindow(window_).work_area(); 355 gfx::Screen::GetDisplayNearestWindow(window_).work_area();
354 356
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 return aura::Env::GetInstance()->is_mouse_button_down(); 1050 return aura::Env::GetInstance()->is_mouse_button_down();
1049 } 1051 }
1050 1052
1051 // static 1053 // static
1052 bool NativeWidgetPrivate::IsTouchDown() { 1054 bool NativeWidgetPrivate::IsTouchDown() {
1053 return aura::Env::GetInstance()->is_touch_down(); 1055 return aura::Env::GetInstance()->is_touch_down();
1054 } 1056 }
1055 1057
1056 } // namespace internal 1058 } // namespace internal
1057 } // namespace views 1059 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | ui/views/widget/native_widget_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698