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

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

Issue 686493002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « ui/views/widget/window_reorderer.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/window_reorderer.h" 5 #include "ui/views/widget/window_reorderer.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 GetOrderOfViewsWithLayers(view->child_at(i), parent_layer, hosts, order); 54 GetOrderOfViewsWithLayers(view->child_at(i), parent_layer, hosts, order);
55 } 55 }
56 56
57 } // namespace 57 } // namespace
58 58
59 // Class which reorders windows as a result of the kHostViewKey property being 59 // Class which reorders windows as a result of the kHostViewKey property being
60 // set on the window. 60 // set on the window.
61 class WindowReorderer::AssociationObserver : public aura::WindowObserver { 61 class WindowReorderer::AssociationObserver : public aura::WindowObserver {
62 public: 62 public:
63 explicit AssociationObserver(WindowReorderer* reorderer); 63 explicit AssociationObserver(WindowReorderer* reorderer);
64 virtual ~AssociationObserver(); 64 ~AssociationObserver() override;
65 65
66 // Start/stop observing changes in the kHostViewKey property on |window|. 66 // Start/stop observing changes in the kHostViewKey property on |window|.
67 void StartObserving(aura::Window* window); 67 void StartObserving(aura::Window* window);
68 void StopObserving(aura::Window* window); 68 void StopObserving(aura::Window* window);
69 69
70 private: 70 private:
71 // aura::WindowObserver overrides: 71 // aura::WindowObserver overrides:
72 virtual void OnWindowPropertyChanged(aura::Window* window, 72 void OnWindowPropertyChanged(aura::Window* window,
73 const void* key, 73 const void* key,
74 intptr_t old) override; 74 intptr_t old) override;
75 virtual void OnWindowDestroying(aura::Window* window) override; 75 void OnWindowDestroying(aura::Window* window) override;
76 76
77 // Not owned. 77 // Not owned.
78 WindowReorderer* reorderer_; 78 WindowReorderer* reorderer_;
79 79
80 std::set<aura::Window*> windows_; 80 std::set<aura::Window*> windows_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(AssociationObserver); 82 DISALLOW_COPY_AND_ASSIGN(AssociationObserver);
83 }; 83 };
84 84
85 WindowReorderer::AssociationObserver::AssociationObserver( 85 WindowReorderer::AssociationObserver::AssociationObserver(
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 association_observer_->StopObserving(window); 192 association_observer_->StopObserving(window);
193 } 193 }
194 194
195 void WindowReorderer::OnWindowDestroying(aura::Window* window) { 195 void WindowReorderer::OnWindowDestroying(aura::Window* window) {
196 parent_window_->RemoveObserver(this); 196 parent_window_->RemoveObserver(this);
197 parent_window_ = NULL; 197 parent_window_ = NULL;
198 association_observer_.reset(); 198 association_observer_.reset();
199 } 199 }
200 200
201 } // namespace views 201 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/window_reorderer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698