Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #include "base/win/enum_variant.h" | 5 #include "base/win/enum_variant.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 | 10 |
| 11 #include <Windows.h> | |
| 12 #include <shobjidl.h> | |
| 13 | |
| 14 IVirtualDesktopManager* g_vdm; | |
|
brettw
2016/01/21 17:37:32
Is this mixed in from another patch? It doesn't se
brettw
2016/01/21 19:24:17
You're going to remove this before checkin, right?
brucedawson
2016/01/21 19:38:48
Yes. Definitely. I need to test a few more variant
| |
| 15 | |
| 11 namespace base { | 16 namespace base { |
| 12 namespace win { | 17 namespace win { |
| 13 | 18 |
| 14 EnumVariant::EnumVariant(unsigned long count) | 19 EnumVariant::EnumVariant(unsigned long count) |
| 15 : items_(new VARIANT[count]), | 20 : items_(new VARIANT[count]), |
| 16 count_(count), | 21 count_(count), |
| 17 current_index_(0) { | 22 current_index_(0) { |
| 18 } | 23 } |
| 19 | 24 |
| 20 EnumVariant::~EnumVariant() { | 25 EnumVariant::~EnumVariant() { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 if (count_ > 0) | 79 if (count_ > 0) |
| 75 memcpy(other->ItemAt(0), &items_[0], count_ * sizeof(VARIANT)); | 80 memcpy(other->ItemAt(0), &items_[0], count_ * sizeof(VARIANT)); |
| 76 other->Skip(current_index_); | 81 other->Skip(current_index_); |
| 77 other->AddRef(); | 82 other->AddRef(); |
| 78 *out_cloned_object = other; | 83 *out_cloned_object = other; |
| 79 return S_OK; | 84 return S_OK; |
| 80 } | 85 } |
| 81 | 86 |
| 82 } // namespace win | 87 } // namespace win |
| 83 } // namespace base | 88 } // namespace base |
| OLD | NEW |