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

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_ = 1;
12 }
13
14 IUnknownImpl::~IUnknownImpl() {
15 }
16
17 ULONG STDMETHODCALLTYPE IUnknownImpl::AddRef() {
18 return base::AtomicRefCountIncAndReturnValue(&ref_count_);
19 }
20
21 ULONG STDMETHODCALLTYPE IUnknownImpl::Release() {
22 AtomicRefCount new_ref_count =
23 base::AtomicRefCountDecAndReturnValue(&ref_count_);
24 if (new_ref_count == 0)
25 delete this;
26 return new_ref_count;
27 }
28
29 STDMETHODIMP IUnknownImpl::QueryInterface(REFIID riid, void** ppv) {
30 if (riid == IID_IUnknown) {
31 *ppv = this;
32 AddRef();
33 return S_OK;
34 }
35
36 *ppv = NULL;
37 return E_NOINTERFACE;
38 }
39
40 } // namespace win
41 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698