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

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

Issue 8353005: aura: Make keyevents for renderers work correctly in X11. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 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 | Annotate | Revision Log
« no previous file with comments | « ui/base/keycodes/keyboard_code_conversion_x.h ('k') | no next file » | 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) 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 "views/widget/native_widget_aura.h" 5 #include "views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/aura/desktop.h" 8 #include "ui/aura/desktop.h"
9 #include "ui/aura/event.h" 9 #include "ui/aura/event.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 TouchEvent touch_event(event); 527 TouchEvent touch_event(event);
528 return delegate_->OnTouchEvent(touch_event); 528 return delegate_->OnTouchEvent(touch_event);
529 } 529 }
530 530
531 bool NativeWidgetAura::ShouldActivate(aura::Event* event) { 531 bool NativeWidgetAura::ShouldActivate(aura::Event* event) {
532 return can_activate_; 532 return can_activate_;
533 } 533 }
534 534
535 void NativeWidgetAura::OnActivated() { 535 void NativeWidgetAura::OnActivated() {
536 delegate_->OnNativeWidgetActivationChanged(true); 536 delegate_->OnNativeWidgetActivationChanged(true);
537 if (IsVisible()) 537 if (IsVisible() && GetWidget()->non_client_view())
538 GetWidget()->non_client_view()->SchedulePaint(); 538 GetWidget()->non_client_view()->SchedulePaint();
539 } 539 }
540 540
541 void NativeWidgetAura::OnLostActive() { 541 void NativeWidgetAura::OnLostActive() {
542 delegate_->OnNativeWidgetActivationChanged(false); 542 delegate_->OnNativeWidgetActivationChanged(false);
543 if (IsVisible()) 543 if (IsVisible() && GetWidget()->non_client_view())
544 GetWidget()->non_client_view()->SchedulePaint(); 544 GetWidget()->non_client_view()->SchedulePaint();
545 } 545 }
546 546
547 void NativeWidgetAura::OnCaptureLost() { 547 void NativeWidgetAura::OnCaptureLost() {
548 delegate_->OnMouseCaptureLost(); 548 delegate_->OnMouseCaptureLost();
549 } 549 }
550 550
551 void NativeWidgetAura::OnPaint(gfx::Canvas* canvas) { 551 void NativeWidgetAura::OnPaint(gfx::Canvas* canvas) {
552 delegate_->OnNativeWidgetPaint(canvas); 552 delegate_->OnNativeWidgetPaint(canvas);
553 } 553 }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 } 654 }
655 655
656 // static 656 // static
657 bool NativeWidgetPrivate::IsMouseButtonDown() { 657 bool NativeWidgetPrivate::IsMouseButtonDown() {
658 NOTIMPLEMENTED(); 658 NOTIMPLEMENTED();
659 return false; 659 return false;
660 } 660 }
661 661
662 } // namespace internal 662 } // namespace internal
663 } // namespace views 663 } // namespace views
OLDNEW
« no previous file with comments | « ui/base/keycodes/keyboard_code_conversion_x.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698