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

Side by Side Diff: ui/wm/core/shadow_controller.cc

Issue 681873003: 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/wm/core/shadow_controller.h ('k') | ui/wm/core/shadow_controller_unittest.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/wm/core/shadow_controller.h" 5 #include "ui/wm/core/shadow_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // EnvObserver). 90 // EnvObserver).
91 class ShadowController::Impl : 91 class ShadowController::Impl :
92 public aura::EnvObserver, 92 public aura::EnvObserver,
93 public aura::WindowObserver, 93 public aura::WindowObserver,
94 public base::RefCounted<Impl> { 94 public base::RefCounted<Impl> {
95 public: 95 public:
96 // Returns the singleton instance, destroyed when there are no more refs. 96 // Returns the singleton instance, destroyed when there are no more refs.
97 static Impl* GetInstance(); 97 static Impl* GetInstance();
98 98
99 // aura::EnvObserver override: 99 // aura::EnvObserver override:
100 virtual void OnWindowInitialized(aura::Window* window) override; 100 void OnWindowInitialized(aura::Window* window) override;
101 101
102 // aura::WindowObserver overrides: 102 // aura::WindowObserver overrides:
103 virtual void OnWindowPropertyChanged( 103 void OnWindowPropertyChanged(aura::Window* window,
104 aura::Window* window, const void* key, intptr_t old) override; 104 const void* key,
105 virtual void OnWindowBoundsChanged( 105 intptr_t old) override;
106 aura::Window* window, 106 void OnWindowBoundsChanged(aura::Window* window,
107 const gfx::Rect& old_bounds, 107 const gfx::Rect& old_bounds,
108 const gfx::Rect& new_bounds) override; 108 const gfx::Rect& new_bounds) override;
109 virtual void OnWindowDestroyed(aura::Window* window) override; 109 void OnWindowDestroyed(aura::Window* window) override;
110 110
111 private: 111 private:
112 friend class base::RefCounted<Impl>; 112 friend class base::RefCounted<Impl>;
113 friend class ShadowController; 113 friend class ShadowController;
114 friend class ShadowController::TestApi; 114 friend class ShadowController::TestApi;
115 115
116 typedef std::map<aura::Window*, linked_ptr<Shadow> > WindowShadowMap; 116 typedef std::map<aura::Window*, linked_ptr<Shadow> > WindowShadowMap;
117 117
118 Impl(); 118 Impl();
119 virtual ~Impl(); 119 ~Impl() override;
120 120
121 // Forwarded from ShadowController. 121 // Forwarded from ShadowController.
122 void OnWindowActivated(aura::Window* gained_active, 122 void OnWindowActivated(aura::Window* gained_active,
123 aura::Window* lost_active); 123 aura::Window* lost_active);
124 124
125 // Checks if |window| is visible and contains a property requesting a shadow. 125 // Checks if |window| is visible and contains a property requesting a shadow.
126 bool ShouldShowShadowForWindow(aura::Window* window) const; 126 bool ShouldShowShadowForWindow(aura::Window* window) const;
127 127
128 // Returns |window|'s shadow from |window_shadows_|, or NULL if no shadow 128 // Returns |window|'s shadow from |window_shadows_|, or NULL if no shadow
129 // exists. 129 // exists.
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 impl_->OnWindowActivated(gained_active, lost_active); 276 impl_->OnWindowActivated(gained_active, lost_active);
277 } 277 }
278 278
279 // ShadowController::TestApi --------------------------------------------------- 279 // ShadowController::TestApi ---------------------------------------------------
280 280
281 Shadow* ShadowController::TestApi::GetShadowForWindow(aura::Window* window) { 281 Shadow* ShadowController::TestApi::GetShadowForWindow(aura::Window* window) {
282 return controller_->impl_->GetShadowForWindow(window); 282 return controller_->impl_->GetShadowForWindow(window);
283 } 283 }
284 284
285 } // namespace wm 285 } // namespace wm
OLDNEW
« no previous file with comments | « ui/wm/core/shadow_controller.h ('k') | ui/wm/core/shadow_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698