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

Side by Side Diff: mojo/views/native_widget_view_manager.cc

Issue 634483003: replace OVERRIDE and FINAL with override and final in mojo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove compiler_specific.h inclusions Created 6 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
« no previous file with comments | « mojo/views/native_widget_view_manager.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/views/native_widget_view_manager.h" 5 #include "mojo/views/native_widget_view_manager.h"
6 6
7 #include "mojo/aura/window_tree_host_mojo.h" 7 #include "mojo/aura/window_tree_host_mojo.h"
8 #include "mojo/services/public/cpp/input_events/input_events_type_converters.h" 8 #include "mojo/services/public/cpp/input_events/input_events_type_converters.h"
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/client/default_capture_client.h" 10 #include "ui/aura/client/default_capture_client.h"
(...skipping 14 matching lines...) Expand all
25 25
26 namespace mojo { 26 namespace mojo {
27 namespace { 27 namespace {
28 28
29 // TODO: figure out what this should be. 29 // TODO: figure out what this should be.
30 class FocusRulesImpl : public wm::BaseFocusRules { 30 class FocusRulesImpl : public wm::BaseFocusRules {
31 public: 31 public:
32 FocusRulesImpl() {} 32 FocusRulesImpl() {}
33 virtual ~FocusRulesImpl() {} 33 virtual ~FocusRulesImpl() {}
34 34
35 virtual bool SupportsChildActivation(aura::Window* window) const OVERRIDE { 35 virtual bool SupportsChildActivation(aura::Window* window) const override {
36 return true; 36 return true;
37 } 37 }
38 38
39 private: 39 private:
40 DISALLOW_COPY_AND_ASSIGN(FocusRulesImpl); 40 DISALLOW_COPY_AND_ASSIGN(FocusRulesImpl);
41 }; 41 };
42 42
43 class MinimalInputEventFilter : public ui::internal::InputMethodDelegate, 43 class MinimalInputEventFilter : public ui::internal::InputMethodDelegate,
44 public ui::EventHandler { 44 public ui::EventHandler {
45 public: 45 public:
(...skipping 12 matching lines...) Expand all
58 } 58 }
59 59
60 virtual ~MinimalInputEventFilter() { 60 virtual ~MinimalInputEventFilter() {
61 root_->RemovePreTargetHandler(this); 61 root_->RemovePreTargetHandler(this);
62 root_->SetProperty(aura::client::kRootWindowInputMethodKey, 62 root_->SetProperty(aura::client::kRootWindowInputMethodKey,
63 static_cast<ui::InputMethod*>(NULL)); 63 static_cast<ui::InputMethod*>(NULL));
64 } 64 }
65 65
66 private: 66 private:
67 // ui::EventHandler: 67 // ui::EventHandler:
68 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE { 68 virtual void OnKeyEvent(ui::KeyEvent* event) override {
69 // See the comment in InputMethodEventFilter::OnKeyEvent() for details. 69 // See the comment in InputMethodEventFilter::OnKeyEvent() for details.
70 if (event->IsTranslated()) { 70 if (event->IsTranslated()) {
71 event->SetTranslated(false); 71 event->SetTranslated(false);
72 } else { 72 } else {
73 if (input_method_->DispatchKeyEvent(*event)) 73 if (input_method_->DispatchKeyEvent(*event))
74 event->StopPropagation(); 74 event->StopPropagation();
75 } 75 }
76 } 76 }
77 77
78 // ui::internal::InputMethodDelegate: 78 // ui::internal::InputMethodDelegate:
79 virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) OVERRIDE { 79 virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override {
80 // See the comment in InputMethodEventFilter::DispatchKeyEventPostIME() for 80 // See the comment in InputMethodEventFilter::DispatchKeyEventPostIME() for
81 // details. 81 // details.
82 ui::KeyEvent aura_event(event); 82 ui::KeyEvent aura_event(event);
83 aura_event.SetTranslated(true); 83 aura_event.SetTranslated(true);
84 ui::EventDispatchDetails details = 84 ui::EventDispatchDetails details =
85 root_->GetHost()->dispatcher()->OnEventFromSource(&aura_event); 85 root_->GetHost()->dispatcher()->OnEventFromSource(&aura_event);
86 return aura_event.handled() || details.dispatcher_destroyed; 86 return aura_event.handled() || details.dispatcher_destroyed;
87 } 87 }
88 88
89 aura::Window* root_; 89 aura::Window* root_;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 148 }
149 149
150 void NativeWidgetViewManager::OnViewInputEvent(View* view, 150 void NativeWidgetViewManager::OnViewInputEvent(View* view,
151 const EventPtr& event) { 151 const EventPtr& event) {
152 scoped_ptr<ui::Event> ui_event(event.To<scoped_ptr<ui::Event> >()); 152 scoped_ptr<ui::Event> ui_event(event.To<scoped_ptr<ui::Event> >());
153 if (ui_event) 153 if (ui_event)
154 window_tree_host_->SendEventToProcessor(ui_event.get()); 154 window_tree_host_->SendEventToProcessor(ui_event.get());
155 } 155 }
156 156
157 } // namespace mojo 157 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/views/native_widget_view_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698