Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef COMPONENTS_ARC_INTENT_HELPER_LOCAL_ACTIVITY_HELPER_H_ | 5 #ifndef COMPONENTS_ARC_INTENT_HELPER_LOCAL_ACTIVITY_HELPER_H_ |
| 6 #define COMPONENTS_ARC_INTENT_HELPER_LOCAL_ACTIVITY_HELPER_H_ | 6 #define COMPONENTS_ARC_INTENT_HELPER_LOCAL_ACTIVITY_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | |
| 10 #include "components/arc/common/intent_helper.mojom.h" | |
| 11 #include "mojo/public/cpp/bindings/binding.h" | |
| 9 | 12 |
| 10 class GURL; | 13 class GURL; |
| 11 | 14 |
| 12 namespace arc { | 15 namespace arc { |
| 13 | 16 |
| 14 class LocalActivityResolver { | 17 class LocalActivityResolver : public base::RefCounted<LocalActivityResolver> { |
| 15 public: | 18 public: |
| 16 LocalActivityResolver() = default; | 19 LocalActivityResolver() = default; |
| 20 | |
| 21 bool ShouldChromeHandleUrl(const GURL& url); | |
| 22 void UpdateIntentFilters(mojo::Array<mojom::IntentFilterPtr>& intent_filters); | |
|
Yusuke Sato
2016/06/17 21:51:15
Is '&' necessary?
zentaro
2016/06/17 23:37:35
Yes - otherwise is will try to copy which isn't al
| |
| 23 | |
| 24 private: | |
| 25 friend class base::RefCounted<LocalActivityResolver>; | |
| 17 ~LocalActivityResolver() = default; | 26 ~LocalActivityResolver() = default; |
| 18 | 27 |
| 19 bool ShouldChromeHandleUrl(const GURL& url); | 28 mojo::Array<mojom::IntentFilterPtr> intent_filters_; |
|
Yusuke Sato
2016/06/17 21:51:15
Mind adding a code comment to explain what this is
zentaro
2016/06/17 23:37:35
Done.
| |
| 20 | |
| 21 private: | |
| 22 DISALLOW_COPY_AND_ASSIGN(LocalActivityResolver); | 29 DISALLOW_COPY_AND_ASSIGN(LocalActivityResolver); |
| 23 }; | 30 }; |
| 24 | 31 |
| 25 } // namespace arc | 32 } // namespace arc |
| 26 | 33 |
| 27 #endif // COMPONENTS_ARC_INTENT_HELPER_LOCAL_ACTIVITY_HELPER_H_ | 34 #endif // COMPONENTS_ARC_INTENT_HELPER_LOCAL_ACTIVITY_HELPER_H_ |
| OLD | NEW |