extension_zoom_request_client.cc 897 B

123456789101112131415161718192021222324252627
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "extensions/browser/extension_zoom_request_client.h"
  5. #include "extensions/common/features/behavior_feature.h"
  6. #include "extensions/common/features/feature.h"
  7. #include "extensions/common/features/feature_provider.h"
  8. namespace extensions {
  9. ExtensionZoomRequestClient::ExtensionZoomRequestClient(
  10. scoped_refptr<const Extension> extension)
  11. : extension_(extension) {
  12. }
  13. bool ExtensionZoomRequestClient::ShouldSuppressBubble() const {
  14. const Feature* feature =
  15. FeatureProvider::GetBehaviorFeature(behavior_feature::kZoomWithoutBubble);
  16. return feature && feature->IsAvailableToExtension(extension()).is_available();
  17. }
  18. ExtensionZoomRequestClient::~ExtensionZoomRequestClient() {
  19. }
  20. } // namespace extensions