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

Side by Side Diff: base/win/enum_variant.h

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 #ifndef BASE_WIN_ENUM_VARIANT_H_
6 #define BASE_WIN_ENUM_VARIANT_H_
7 #pragma once
8
9 #include <unknwn.h>
10
11 #include "base/memory/scoped_ptr.h"
12 #include "base/win/iunknown_impl.h"
13
14 namespace base {
15 namespace win {
16
17 // A simple implementation of IEnumVARIANT.
18 class BASE_EXPORT EnumVariant
19 : public IEnumVARIANT,
20 public IUnknownImpl {
21 public:
22 // The constructor allocates an array of size |count|. Then use
23 // ItemAt to set the value of each item in the array to initialize it.
24 explicit EnumVariant(unsigned long count);
25
26 // Returns a mutable pointer to the item at position |index|.
27 VARIANT* ItemAt(unsigned long index);
M-A Ruel 2011/12/01 00:35:13 Why doesn't it return a reference? Just wondering.
dmazzoni 2011/12/02 00:44:07 I'm used to the Google coding style of pointers fo
28
29 // IUnknown.
30 ULONG STDMETHODCALLTYPE AddRef() OVERRIDE;
31 ULONG STDMETHODCALLTYPE Release() OVERRIDE;
32 STDMETHODIMP QueryInterface(REFIID riid, void** ppv) OVERRIDE;
33
34 // IEnumVARIANT.
35 STDMETHODIMP Next(ULONG requested_count,
36 VARIANT* out_elements,
37 ULONG* out_elements_received);
38 STDMETHODIMP Skip(ULONG skip_count);
39 STDMETHODIMP Reset();
40 STDMETHODIMP Clone(IEnumVARIANT** out_cloned_object);
41
42 private:
43 ~EnumVariant();
44
45 scoped_array<VARIANT> items_;
46 unsigned long count_;
47 unsigned long current_index_;
48 };
49
50 } // namespace win
51 } // namespace base
52
53 #endif // BASE_WIN_ENUM_VARIANT_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/win/enum_variant.cc » ('j') | base/win/enum_variant_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698