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

Side by Side Diff: mojo/bindings/js/handle.h

Issue 668663006: Standardize usage of virtual/override/final in mojo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@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
« no previous file with comments | « mojo/apps/js/test/js_to_cpp_unittest.cc ('k') | mojo/bindings/js/waiting_callback.h » ('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 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 #ifndef MOJO_BINDINGS_JS_HANDLE_H_ 5 #ifndef MOJO_BINDINGS_JS_HANDLE_H_
6 #define MOJO_BINDINGS_JS_HANDLE_H_ 6 #define MOJO_BINDINGS_JS_HANDLE_H_
7 7
8 #include "base/observer_list.h" 8 #include "base/observer_list.h"
9 #include "gin/converter.h" 9 #include "gin/converter.h"
10 #include "gin/handle.h" 10 #include "gin/handle.h"
(...skipping 17 matching lines...) Expand all
28 28
29 mojo::Handle get() const { return handle_.get(); } 29 mojo::Handle get() const { return handle_.get(); }
30 mojo::Handle release() { return handle_.release(); } 30 mojo::Handle release() { return handle_.release(); }
31 void Close(); 31 void Close();
32 32
33 void AddCloseObserver(HandleCloseObserver* observer); 33 void AddCloseObserver(HandleCloseObserver* observer);
34 void RemoveCloseObserver(HandleCloseObserver* observer); 34 void RemoveCloseObserver(HandleCloseObserver* observer);
35 35
36 protected: 36 protected:
37 HandleWrapper(MojoHandle handle); 37 HandleWrapper(MojoHandle handle);
38 virtual ~HandleWrapper(); 38 ~HandleWrapper() override;
39 void NotifyCloseObservers(); 39 void NotifyCloseObservers();
40 40
41 mojo::ScopedHandle handle_; 41 mojo::ScopedHandle handle_;
42 ObserverList<HandleCloseObserver> close_observers_; 42 ObserverList<HandleCloseObserver> close_observers_;
43 }; 43 };
44 44
45 } // namespace js 45 } // namespace js
46 } // namespace mojo 46 } // namespace mojo
47 47
48 namespace gin { 48 namespace gin {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 return false; 80 return false;
81 } 81 }
82 *out = gin::Handle<mojo::js::HandleWrapper>(val, object); 82 *out = gin::Handle<mojo::js::HandleWrapper>(val, object);
83 return true; 83 return true;
84 } 84 }
85 }; 85 };
86 86
87 } // namespace gin 87 } // namespace gin
88 88
89 #endif // MOJO_BINDINGS_JS_HANDLE_H_ 89 #endif // MOJO_BINDINGS_JS_HANDLE_H_
OLDNEW
« no previous file with comments | « mojo/apps/js/test/js_to_cpp_unittest.cc ('k') | mojo/bindings/js/waiting_callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698