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

Side by Side Diff: ash/system/chromeos/brightness/tray_brightness.h

Issue 497733002: Declaring the weak_ptr_factory in proper order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Maintaining function in proper order Created 6 years, 3 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 | « AUTHORS ('k') | ash/system/chromeos/brightness/tray_brightness.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 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 #ifndef ASH_SYSTEM_CHROMEOS_BRIGHTNESS_TRAY_BRIGHTNESS_H_ 5 #ifndef ASH_SYSTEM_CHROMEOS_BRIGHTNESS_TRAY_BRIGHTNESS_H_
6 #define ASH_SYSTEM_CHROMEOS_BRIGHTNESS_TRAY_BRIGHTNESS_H_ 6 #define ASH_SYSTEM_CHROMEOS_BRIGHTNESS_TRAY_BRIGHTNESS_H_
7 7
8 #include "ash/system/tray/system_tray_item.h" 8 #include "ash/system/tray/system_tray_item.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 virtual void DestroyDetailedView() OVERRIDE; 43 virtual void DestroyDetailedView() OVERRIDE;
44 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; 44 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
45 virtual bool ShouldHideArrow() const OVERRIDE; 45 virtual bool ShouldHideArrow() const OVERRIDE;
46 virtual bool ShouldShowShelf() const OVERRIDE; 46 virtual bool ShouldShowShelf() const OVERRIDE;
47 47
48 // Overriden from PowerManagerClient::Observer. 48 // Overriden from PowerManagerClient::Observer.
49 virtual void BrightnessChanged(int level, bool user_initiated) OVERRIDE; 49 virtual void BrightnessChanged(int level, bool user_initiated) OVERRIDE;
50 50
51 void HandleBrightnessChanged(double percent, bool user_initiated); 51 void HandleBrightnessChanged(double percent, bool user_initiated);
52 52
53 base::WeakPtrFactory<TrayBrightness> weak_ptr_factory_;
54
55 tray::BrightnessView* brightness_view_; 53 tray::BrightnessView* brightness_view_;
56 54
57 // Brightness level in the range [0.0, 100.0] that we've heard about most 55 // Brightness level in the range [0.0, 100.0] that we've heard about most
58 // recently. 56 // recently.
59 double current_percent_; 57 double current_percent_;
60 58
61 // Has |current_percent_| been initialized? 59 // Has |current_percent_| been initialized?
62 bool got_current_percent_; 60 bool got_current_percent_;
63 61
62 base::WeakPtrFactory<TrayBrightness> weak_ptr_factory_;
63
64 DISALLOW_COPY_AND_ASSIGN(TrayBrightness); 64 DISALLOW_COPY_AND_ASSIGN(TrayBrightness);
65 }; 65 };
66 66
67 } // namespace ash 67 } // namespace ash
68 68
69 #endif // ASH_SYSTEM_CHROMEOS_BRIGHTNESS_TRAY_BRIGHTNESS_H_ 69 #endif // ASH_SYSTEM_CHROMEOS_BRIGHTNESS_TRAY_BRIGHTNESS_H_
OLDNEW
« no previous file with comments | « AUTHORS ('k') | ash/system/chromeos/brightness/tray_brightness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698