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(); |
| 17 ~LocalActivityResolver() = default; | |
| 18 | 20 |
| 19 bool ShouldChromeHandleUrl(const GURL& url); | 21 bool ShouldChromeHandleUrl(const GURL& url); |
| 22 void UpdateIntentFilters(mojo::Array<mojom::IntentFilterPtr> intent_filters); | |
| 20 | 23 |
| 21 private: | 24 private: |
| 25 friend class base::RefCounted<LocalActivityResolver>; | |
| 26 ~LocalActivityResolver(); | |
|
Yusuke Sato
2016/06/22 19:45:52
override; ?
zentaro
2016/06/22 20:16:14
Can't put it here. It's not virtual in the base cl
Yusuke Sato
2016/06/22 20:38:01
my bad, sorry. you're right.
| |
| 27 | |
| 28 bool IsRelevantIntentFilter(const mojom::IntentFilterPtr& intent_filter); | |
| 29 bool FilterHasViewAction(const mojom::IntentFilterPtr& intent_filter); | |
| 30 bool FilterCategoryIsBrowsable(const mojom::IntentFilterPtr& intent_filter); | |
| 31 bool FilterHandlesWebSchemes(const mojom::IntentFilterPtr& intent_filter); | |
| 32 | |
| 33 // List of intent filters from Android. Used to determine if Chrome should | |
| 34 // handle a URL without handing off to Android. | |
| 35 mojo::Array<mojom::IntentFilterPtr> intent_filters_; | |
| 22 DISALLOW_COPY_AND_ASSIGN(LocalActivityResolver); | 36 DISALLOW_COPY_AND_ASSIGN(LocalActivityResolver); |
|
Yusuke Sato
2016/06/22 19:45:52
nit: a space between line 35 and 36.
zentaro
2016/06/22 20:16:14
Done.
| |
| 23 }; | 37 }; |
| 24 | 38 |
| 25 } // namespace arc | 39 } // namespace arc |
| 26 | 40 |
| 27 #endif // COMPONENTS_ARC_INTENT_HELPER_LOCAL_ACTIVITY_HELPER_H_ | 41 #endif // COMPONENTS_ARC_INTENT_HELPER_LOCAL_ACTIVITY_HELPER_H_ |
| OLD | NEW |