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

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

Issue 10951033: Plumb ClearNativeFocus to DesktopRootWindowHostWin. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: get rid of FocusNativeView Created 8 years, 3 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/desktop_root_window_host_win.h ('k') | ui/views/widget/native_widget_aura.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/desktop_root_window_host_win.h" 5 #include "ui/views/widget/desktop_root_window_host_win.h"
6 6
7 #include "third_party/skia/include/core/SkPath.h" 7 #include "third_party/skia/include/core/SkPath.h"
8 #include "third_party/skia/include/core/SkRegion.h" 8 #include "third_party/skia/include/core/SkRegion.h"
9 #include "ui/aura/desktop/desktop_activation_client.h" 9 #include "ui/aura/desktop/desktop_activation_client.h"
10 #include "ui/aura/desktop/desktop_cursor_client.h" 10 #include "ui/aura/desktop/desktop_cursor_client.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 internal::InputMethodDelegate* 200 internal::InputMethodDelegate*
201 DesktopRootWindowHostWin::GetInputMethodDelegate() { 201 DesktopRootWindowHostWin::GetInputMethodDelegate() {
202 return message_handler_.get(); 202 return message_handler_.get();
203 } 203 }
204 204
205 void DesktopRootWindowHostWin::SetWindowTitle(const string16& title) { 205 void DesktopRootWindowHostWin::SetWindowTitle(const string16& title) {
206 message_handler_->SetTitle(title); 206 message_handler_->SetTitle(title);
207 } 207 }
208 208
209 void DesktopRootWindowHostWin::ClearNativeFocus() {
210 message_handler_->ClearNativeFocus();
211 }
212
209 //////////////////////////////////////////////////////////////////////////////// 213 ////////////////////////////////////////////////////////////////////////////////
210 // DesktopRootWindowHostWin, RootWindowHost implementation: 214 // DesktopRootWindowHostWin, RootWindowHost implementation:
211 215
212 aura::RootWindow* DesktopRootWindowHostWin::GetRootWindow() { 216 aura::RootWindow* DesktopRootWindowHostWin::GetRootWindow() {
213 return root_window_.get(); 217 return root_window_.get();
214 } 218 }
215 219
216 gfx::AcceleratedWidget DesktopRootWindowHostWin::GetAcceleratedWidget() { 220 gfx::AcceleratedWidget DesktopRootWindowHostWin::GetAcceleratedWidget() {
217 return message_handler_->hwnd(); 221 return message_handler_->hwnd();
218 } 222 }
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 } 507 }
504 508
505 void DesktopRootWindowHostWin::HandleNativeBlur(HWND focused_window) { 509 void DesktopRootWindowHostWin::HandleNativeBlur(HWND focused_window) {
506 // TODO(beng): inform the native_widget_delegate_. 510 // TODO(beng): inform the native_widget_delegate_.
507 InputMethod* input_method = GetInputMethod(); 511 InputMethod* input_method = GetInputMethod();
508 if (input_method) 512 if (input_method)
509 input_method->OnBlur(); 513 input_method->OnBlur();
510 } 514 }
511 515
512 bool DesktopRootWindowHostWin::HandleMouseEvent(const ui::MouseEvent& event) { 516 bool DesktopRootWindowHostWin::HandleMouseEvent(const ui::MouseEvent& event) {
517 if (event.flags() & ui::EF_IS_NON_CLIENT)
518 return false;
513 return root_window_host_delegate_->OnHostMouseEvent( 519 return root_window_host_delegate_->OnHostMouseEvent(
514 const_cast<ui::MouseEvent*>(&event)); 520 const_cast<ui::MouseEvent*>(&event));
515 } 521 }
516 522
517 bool DesktopRootWindowHostWin::HandleKeyEvent(const ui::KeyEvent& event) { 523 bool DesktopRootWindowHostWin::HandleKeyEvent(const ui::KeyEvent& event) {
518 return root_window_host_delegate_->OnHostKeyEvent( 524 return root_window_host_delegate_->OnHostKeyEvent(
519 const_cast<ui::KeyEvent*>(&event)); 525 const_cast<ui::KeyEvent*>(&event));
520 } 526 }
521 527
522 bool DesktopRootWindowHostWin::HandleUntranslatedKeyEvent( 528 bool DesktopRootWindowHostWin::HandleUntranslatedKeyEvent(
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 // DesktopRootWindowHost, public: 609 // DesktopRootWindowHost, public:
604 610
605 // static 611 // static
606 DesktopRootWindowHost* DesktopRootWindowHost::Create( 612 DesktopRootWindowHost* DesktopRootWindowHost::Create(
607 internal::NativeWidgetDelegate* native_widget_delegate, 613 internal::NativeWidgetDelegate* native_widget_delegate,
608 const gfx::Rect& initial_bounds) { 614 const gfx::Rect& initial_bounds) {
609 return new DesktopRootWindowHostWin(native_widget_delegate, initial_bounds); 615 return new DesktopRootWindowHostWin(native_widget_delegate, initial_bounds);
610 } 616 }
611 617
612 } // namespace views 618 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_root_window_host_win.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698