Commit 38bece6a authored by David Jacobo's avatar David Jacobo Committed by Chromium LUCI CQ

arc: Sort ArcIntentHelperBridge methods

This CL just moves methods around on the header so it matches the order
in the implementation and viceversa, more cleaing/grouping is needed.

Bug: None
Test: Build.
Change-Id: I49084e9b868dedab1cf58cf90edc7caef5e72259
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2568932
Auto-Submit: David Jacobo <djacobo@chromium.org>
Reviewed-by: default avatarYusuke Sato <yusukes@chromium.org>
Commit-Queue: Yusuke Sato <yusukes@chromium.org>
Commit-Queue: David Jacobo <djacobo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832632}
parent 826c0372
...@@ -137,6 +137,18 @@ void ArcIntentHelperBridge::OnIconInvalidated(const std::string& package_name) { ...@@ -137,6 +137,18 @@ void ArcIntentHelperBridge::OnIconInvalidated(const std::string& package_name) {
icon_loader_.InvalidateIcons(package_name); icon_loader_.InvalidateIcons(package_name);
} }
void ArcIntentHelperBridge::OnIntentFiltersUpdated(
std::vector<IntentFilter> filters) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
intent_filters_.clear();
for (auto& filter : filters)
intent_filters_[filter.package_name()].push_back(std::move(filter));
for (auto& observer : observer_list_)
observer.OnIntentFiltersUpdated(base::nullopt);
}
void ArcIntentHelperBridge::OnOpenDownloads() { void ArcIntentHelperBridge::OnOpenDownloads() {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
RecordOpenType(ArcIntentHelperOpenType::DOWNLOADS); RecordOpenType(ArcIntentHelperOpenType::DOWNLOADS);
...@@ -372,18 +384,6 @@ ArcIntentHelperBridge::FilterOutIntentHelper( ...@@ -372,18 +384,6 @@ ArcIntentHelperBridge::FilterOutIntentHelper(
return handlers_filtered; return handlers_filtered;
} }
void ArcIntentHelperBridge::OnIntentFiltersUpdated(
std::vector<IntentFilter> filters) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
intent_filters_.clear();
for (auto& filter : filters)
intent_filters_[filter.package_name()].push_back(std::move(filter));
for (auto& observer : observer_list_)
observer.OnIntentFiltersUpdated(base::nullopt);
}
const std::vector<IntentFilter>& const std::vector<IntentFilter>&
ArcIntentHelperBridge::GetIntentFilterForPackage( ArcIntentHelperBridge::GetIntentFilterForPackage(
const std::string& package_name) { const std::string& package_name) {
......
...@@ -62,17 +62,6 @@ class ArcIntentHelperBridge : public KeyedService, ...@@ -62,17 +62,6 @@ class ArcIntentHelperBridge : public KeyedService,
ArcBridgeService* bridge_service); ArcBridgeService* bridge_service);
~ArcIntentHelperBridge() override; ~ArcIntentHelperBridge() override;
void SetAdaptiveIconDelegate(AdaptiveIconDelegate* delegate);
void AddObserver(ArcIntentHelperObserver* observer);
void RemoveObserver(ArcIntentHelperObserver* observer);
bool HasObserver(ArcIntentHelperObserver* observer) const;
void HandleCameraResult(
uint32_t intent_id,
arc::mojom::CameraIntentAction action,
const std::vector<uint8_t>& data,
arc::mojom::IntentHelperInstance::HandleCameraResultCallback callback);
// mojom::IntentHelperHost // mojom::IntentHelperHost
void OnIconInvalidated(const std::string& package_name) override; void OnIconInvalidated(const std::string& package_name) override;
void OnIntentFiltersUpdated( void OnIntentFiltersUpdated(
...@@ -85,10 +74,10 @@ class ArcIntentHelperBridge : public KeyedService, ...@@ -85,10 +74,10 @@ class ArcIntentHelperBridge : public KeyedService,
int32_t top_margin, int32_t top_margin,
OnOpenCustomTabCallback callback) override; OnOpenCustomTabCallback callback) override;
void OnOpenChromePage(mojom::ChromePage page) override; void OnOpenChromePage(mojom::ChromePage page) override;
void FactoryResetArc() override;
void OpenWallpaperPicker() override; void OpenWallpaperPicker() override;
void SetWallpaperDeprecated(const std::vector<uint8_t>& jpeg_data) override; void SetWallpaperDeprecated(const std::vector<uint8_t>& jpeg_data) override;
void OpenVolumeControl() override; void OpenVolumeControl() override;
void FactoryResetArc() override;
void OnOpenWebApp(const std::string& url) override; void OnOpenWebApp(const std::string& url) override;
void RecordShareFilesMetrics(mojom::ShareFiles flag) override; void RecordShareFilesMetrics(mojom::ShareFiles flag) override;
void LaunchCameraApp(uint32_t intent_id, void LaunchCameraApp(uint32_t intent_id,
...@@ -125,6 +114,18 @@ class ArcIntentHelperBridge : public KeyedService, ...@@ -125,6 +114,18 @@ class ArcIntentHelperBridge : public KeyedService,
// without checking the filters. // without checking the filters.
bool ShouldChromeHandleUrl(const GURL& url); bool ShouldChromeHandleUrl(const GURL& url);
void SetAdaptiveIconDelegate(AdaptiveIconDelegate* delegate);
void AddObserver(ArcIntentHelperObserver* observer);
void RemoveObserver(ArcIntentHelperObserver* observer);
bool HasObserver(ArcIntentHelperObserver* observer) const;
void HandleCameraResult(
uint32_t intent_id,
arc::mojom::CameraIntentAction action,
const std::vector<uint8_t>& data,
arc::mojom::IntentHelperInstance::HandleCameraResultCallback callback);
// Returns false if |package_name| is for the intent_helper apk. // Returns false if |package_name| is for the intent_helper apk.
static bool IsIntentHelperPackage(const std::string& package_name); static bool IsIntentHelperPackage(const std::string& package_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment