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

Side by Side Diff: base/win/iunknown_impl.cc

Issue 8588036: Improve support for multiselect list box accessibility on Windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/win/iunknown_impl.h"
6
7 namespace base {
8 namespace win {
9
10 IUnknownImpl::IUnknownImpl()
11 : ref_count_(0) {}
M-A Ruel 2011/12/01 00:35:13 One reason to keep the brackets on two lines, like
dmazzoni 2011/12/02 00:44:07 Done.
12
13 IUnknownImpl::~IUnknownImpl() {
14 }
15
16 ULONG STDMETHODCALLTYPE IUnknownImpl::AddRef() {
17 return base::AtomicRefCountIncAndReturnValue(&ref_count_);
18 }
19
20 ULONG STDMETHODCALLTYPE IUnknownImpl::Release() {
21 AtomicRefCount new_ref_count =
22 base::AtomicRefCountDecAndReturnValue(&ref_count_);
23 if (new_ref_count == 0)
24 delete this;
25 return new_ref_count;
26 }
27
28 STDMETHODIMP IUnknownImpl::QueryInterface(REFIID riid, void** ppv) {
29 if (riid == IID_IUnknown) {
30 *ppv = static_cast<IUnknown*>(this);
31 AddRef();
32 return S_OK;
33 }
34
35 *ppv = NULL;
36 return E_NOINTERFACE;
37 }
38
39 } // namespace win
40 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698