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

Side by Side Diff: gin/modules/timer.h

Issue 587713002: Added the "DISALLOW_COPY_AND_ASSIGN(Timer);" for Timer class in gin/module/timer.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | 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 #ifndef GIN_MODULES_TIMER_H_ 5 #ifndef GIN_MODULES_TIMER_H_
6 #define GIN_MODULES_TIMER_H_ 6 #define GIN_MODULES_TIMER_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/timer/timer.h" 9 #include "base/timer/timer.h"
10 #include "gin/gin_export.h" 10 #include "gin/gin_export.h"
(...skipping 24 matching lines...) Expand all
35 private: 35 private:
36 Timer(v8::Isolate* isolate, bool repeating, int delay_ms, 36 Timer(v8::Isolate* isolate, bool repeating, int delay_ms,
37 v8::Handle<v8::Function> function); 37 v8::Handle<v8::Function> function);
38 virtual ~Timer(); 38 virtual ~Timer();
39 void OnTimerFired(); 39 void OnTimerFired();
40 40
41 base::Timer timer_; 41 base::Timer timer_;
42 base::WeakPtr<gin::Runner> runner_; 42 base::WeakPtr<gin::Runner> runner_;
43 base::WeakPtrFactory<Timer> weak_factory_; 43 base::WeakPtrFactory<Timer> weak_factory_;
44 44
45 DISALLOW_COPY_AND_ASSIGN(Timer);
45 }; 46 };
46 47
47 48
48 class GIN_EXPORT TimerModule : public Wrappable<TimerModule> { 49 class GIN_EXPORT TimerModule : public Wrappable<TimerModule> {
49 public: 50 public:
50 static const char kName[]; 51 static const char kName[];
51 static WrapperInfo kWrapperInfo; 52 static WrapperInfo kWrapperInfo;
52 static Handle<TimerModule> Create(v8::Isolate* isolate); 53 static Handle<TimerModule> Create(v8::Isolate* isolate);
53 static v8::Local<v8::Value> GetModule(v8::Isolate* isolate); 54 static v8::Local<v8::Value> GetModule(v8::Isolate* isolate);
54 55
55 private: 56 private:
56 TimerModule(); 57 TimerModule();
57 virtual ~TimerModule(); 58 virtual ~TimerModule();
58 59
59 virtual ObjectTemplateBuilder GetObjectTemplateBuilder( 60 virtual ObjectTemplateBuilder GetObjectTemplateBuilder(
60 v8::Isolate* isolate) OVERRIDE; 61 v8::Isolate* isolate) OVERRIDE;
61 }; 62 };
62 63
63 } // namespace gin 64 } // namespace gin
64 65
65 #endif // GIN_MODULES_TIMER_H_ 66 #endif // GIN_MODULES_TIMER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698