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

Side by Side Diff: ui/views/mus/window_tree_host_mus.cc

Issue 2188613002: Changes WindowTreeHostMus to not always StopPropagation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/mus/window_tree_host_mus.h" 5 #include "ui/views/mus/window_tree_host_mus.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "services/ui/public/cpp/window.h" 8 #include "services/ui/public/cpp/window.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/aura/window_event_dispatcher.h" 10 #include "ui/aura/window_event_dispatcher.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 WindowTreeHostMus::~WindowTreeHostMus() { 59 WindowTreeHostMus::~WindowTreeHostMus() {
60 DestroyCompositor(); 60 DestroyCompositor();
61 DestroyDispatcher(); 61 DestroyDispatcher();
62 } 62 }
63 63
64 void WindowTreeHostMus::DispatchEvent(ui::Event* event) { 64 void WindowTreeHostMus::DispatchEvent(ui::Event* event) {
65 if (event->IsKeyEvent() && GetInputMethod()) { 65 if (event->IsKeyEvent() && GetInputMethod()) {
66 GetInputMethod()->DispatchKeyEvent(event->AsKeyEvent()); 66 GetInputMethod()->DispatchKeyEvent(event->AsKeyEvent());
67 event->StopPropagation();
68 return; 67 return;
69 } 68 }
70 WindowTreeHostPlatform::DispatchEvent(event); 69 WindowTreeHostPlatform::DispatchEvent(event);
71 } 70 }
72 71
73 void WindowTreeHostMus::OnClosed() { 72 void WindowTreeHostMus::OnClosed() {
74 if (native_widget_) 73 if (native_widget_)
75 native_widget_->OnPlatformWindowClosed(); 74 native_widget_->OnPlatformWindowClosed();
76 } 75 }
77 76
78 void WindowTreeHostMus::OnActivationChanged(bool active) { 77 void WindowTreeHostMus::OnActivationChanged(bool active) {
79 if (active) 78 if (active)
80 GetInputMethod()->OnFocus(); 79 GetInputMethod()->OnFocus();
81 else 80 else
82 GetInputMethod()->OnBlur(); 81 GetInputMethod()->OnBlur();
83 if (native_widget_) 82 if (native_widget_)
84 native_widget_->OnActivationChanged(active); 83 native_widget_->OnActivationChanged(active);
85 WindowTreeHostPlatform::OnActivationChanged(active); 84 WindowTreeHostPlatform::OnActivationChanged(active);
86 } 85 }
87 86
88 void WindowTreeHostMus::OnCloseRequest() { 87 void WindowTreeHostMus::OnCloseRequest() {
89 OnHostCloseRequested(); 88 OnHostCloseRequested();
90 } 89 }
91 90
92 } // namespace views 91 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698