OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "stdafx.h" | 5 #include "stdafx.h" |
6 #include "win8/metro_driver/file_picker_ash.h" | 6 #include "win8/metro_driver/file_picker_ash.h" |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/synchronization/waitable_event.h" | 12 #include "base/synchronization/waitable_event.h" |
13 #include "base/win/metro.h" | 13 #include "base/win/metro.h" |
14 #include "base/win/scoped_comptr.h" | 14 #include "base/win/scoped_comptr.h" |
15 #include "ui/metro_viewer/metro_viewer_messages.h" | 15 #include "ui/metro_viewer/metro_viewer_messages.h" |
16 #include "win8/metro_driver/chrome_app_view_ash.h" | 16 #include "win8/metro_driver/chrome_app_view_ash.h" |
17 #include "win8/metro_driver/winrt_utils.h" | 17 #include "win8/metro_driver/winrt_utils.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 namespace winstorage = ABI::Windows::Storage; | |
22 typedef winfoundtn::Collections::IVector<HSTRING> StringVectorItf; | 21 typedef winfoundtn::Collections::IVector<HSTRING> StringVectorItf; |
23 | 22 |
24 // TODO(siggi): Complete this implementation and move it to a common place. | 23 // TODO(siggi): Complete this implementation and move it to a common place. |
25 class StringVectorImpl : public mswr::RuntimeClass<StringVectorItf> { | 24 class StringVectorImpl : public mswr::RuntimeClass<StringVectorItf> { |
26 public: | 25 public: |
27 ~StringVectorImpl() { | 26 ~StringVectorImpl() { |
28 std::for_each(strings_.begin(), strings_.end(), ::WindowsDeleteString); | 27 std::for_each(strings_.begin(), strings_.end(), ::WindowsDeleteString); |
29 } | 28 } |
30 | 29 |
31 HRESULT RuntimeClassInitialize(const std::vector<base::string16>& list) { | 30 HRESULT RuntimeClassInitialize(const std::vector<base::string16>& list) { |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 } else { | 611 } else { |
613 LOG(ERROR) << "NULL IStorageItem"; | 612 LOG(ERROR) << "NULL IStorageItem"; |
614 } | 613 } |
615 } else { | 614 } else { |
616 LOG(ERROR) << "Unexpected async status " << static_cast<int>(status); | 615 LOG(ERROR) << "Unexpected async status " << static_cast<int>(status); |
617 } | 616 } |
618 app_view_->OnFolderPickerCompleted(this, success_); | 617 app_view_->OnFolderPickerCompleted(this, success_); |
619 return S_OK; | 618 return S_OK; |
620 } | 619 } |
621 | 620 |
OLD | NEW |