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

Side by Side Diff: athena/screen/screen_manager_impl.cc

Issue 641683003: C++11 override style change for athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: 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
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 "athena/screen/screen_manager_impl.h" 5 #include "athena/screen/screen_manager_impl.h"
6 6
7 #include "athena/input/public/accelerator_manager.h" 7 #include "athena/input/public/accelerator_manager.h"
8 #include "athena/screen/modal_window_controller.h" 8 #include "athena/screen/modal_window_controller.h"
9 #include "athena/screen/screen_accelerator_handler.h" 9 #include "athena/screen/screen_accelerator_handler.h"
10 #include "athena/util/container_priorities.h" 10 #include "athena/util/container_priorities.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 aura::Window* GetContainer(aura::Window* window) { 73 aura::Window* GetContainer(aura::Window* window) {
74 aura::Window* container = window; 74 aura::Window* container = window;
75 while (container && !container->GetProperty(kContainerParamsKey)) 75 while (container && !container->GetProperty(kContainerParamsKey))
76 container = container->parent(); 76 container = container->parent();
77 return container; 77 return container;
78 } 78 }
79 79
80 class AthenaFocusRules : public wm::BaseFocusRules { 80 class AthenaFocusRules : public wm::BaseFocusRules {
81 public: 81 public:
82 AthenaFocusRules() {} 82 AthenaFocusRules() {}
83 virtual ~AthenaFocusRules() {} 83 ~AthenaFocusRules() override {}
84 84
85 // wm::BaseFocusRules: 85 // wm::BaseFocusRules:
86 virtual bool SupportsChildActivation(aura::Window* window) const override { 86 virtual bool SupportsChildActivation(aura::Window* window) const override {
87 ScreenManager::ContainerParams* params = 87 ScreenManager::ContainerParams* params =
88 window->GetProperty(kContainerParamsKey); 88 window->GetProperty(kContainerParamsKey);
89 return params && params->can_activate_children; 89 return params && params->can_activate_children;
90 } 90 }
91 virtual bool CanActivateWindow(aura::Window* window) const override { 91 virtual bool CanActivateWindow(aura::Window* window) const override {
92 if (!window) 92 if (!window)
93 return true; 93 return true;
(...skipping 23 matching lines...) Expand all
117 } 117 }
118 118
119 private: 119 private:
120 DISALLOW_COPY_AND_ASSIGN(AthenaFocusRules); 120 DISALLOW_COPY_AND_ASSIGN(AthenaFocusRules);
121 }; 121 };
122 122
123 class AthenaScreenPositionClient : public aura::client::ScreenPositionClient { 123 class AthenaScreenPositionClient : public aura::client::ScreenPositionClient {
124 public: 124 public:
125 AthenaScreenPositionClient() { 125 AthenaScreenPositionClient() {
126 } 126 }
127 virtual ~AthenaScreenPositionClient() { 127 ~AthenaScreenPositionClient() override {
128 } 128 }
129 129
130 private: 130 private:
131 // aura::client::ScreenPositionClient: 131 // aura::client::ScreenPositionClient:
132 virtual void ConvertPointToScreen(const aura::Window* window, 132 virtual void ConvertPointToScreen(const aura::Window* window,
133 gfx::Point* point) override { 133 gfx::Point* point) override {
134 const aura::Window* root = window->GetRootWindow(); 134 const aura::Window* root = window->GetRootWindow();
135 aura::Window::ConvertPointToTarget(window, root, point); 135 aura::Window::ConvertPointToTarget(window, root, point);
136 } 136 }
137 137
(...skipping 16 matching lines...) Expand all
154 } 154 }
155 155
156 DISALLOW_COPY_AND_ASSIGN(AthenaScreenPositionClient); 156 DISALLOW_COPY_AND_ASSIGN(AthenaScreenPositionClient);
157 }; 157 };
158 158
159 class AthenaWindowTargeter : public aura::WindowTargeter { 159 class AthenaWindowTargeter : public aura::WindowTargeter {
160 public: 160 public:
161 explicit AthenaWindowTargeter(aura::Window* root_window) 161 explicit AthenaWindowTargeter(aura::Window* root_window)
162 : root_window_(root_window) {} 162 : root_window_(root_window) {}
163 163
164 virtual ~AthenaWindowTargeter() {} 164 ~AthenaWindowTargeter() override {}
165 165
166 private: 166 private:
167 // aura::WindowTargeter: 167 // aura::WindowTargeter:
168 virtual bool SubtreeCanAcceptEvent( 168 virtual bool SubtreeCanAcceptEvent(
169 ui::EventTarget* target, 169 ui::EventTarget* target,
170 const ui::LocatedEvent& event) const override { 170 const ui::LocatedEvent& event) const override {
171 const aura::Window::Windows& containers = root_window_->children(); 171 const aura::Window::Windows& containers = root_window_->children();
172 auto r_iter = 172 auto r_iter =
173 std::find_if(containers.rbegin(), containers.rend(), &BlockEvents); 173 std::find_if(containers.rbegin(), containers.rend(), &BlockEvents);
174 if (r_iter == containers.rend()) 174 if (r_iter == containers.rend())
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 } 396 }
397 397
398 // static 398 // static
399 void ScreenManager::Shutdown() { 399 void ScreenManager::Shutdown() {
400 DCHECK(instance); 400 DCHECK(instance);
401 delete instance; 401 delete instance;
402 DCHECK(!instance); 402 DCHECK(!instance);
403 } 403 }
404 404
405 } // namespace athena 405 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698