| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 "extensions/browser/extension_zoom_request_client.h" | 5 #include "extensions/browser/extension_zoom_request_client.h" |
| 6 | 6 |
| 7 #include "extensions/common/features/behavior_feature.h" | 7 #include "extensions/common/features/behavior_feature.h" |
| 8 #include "extensions/common/features/feature.h" |
| 8 #include "extensions/common/features/feature_provider.h" | 9 #include "extensions/common/features/feature_provider.h" |
| 9 | 10 |
| 10 namespace extensions { | 11 namespace extensions { |
| 11 | 12 |
| 12 ExtensionZoomRequestClient::ExtensionZoomRequestClient( | 13 ExtensionZoomRequestClient::ExtensionZoomRequestClient( |
| 13 scoped_refptr<const Extension> extension) | 14 scoped_refptr<const Extension> extension) |
| 14 : extension_(extension) { | 15 : extension_(extension) { |
| 15 } | 16 } |
| 16 | 17 |
| 17 bool ExtensionZoomRequestClient::ShouldSuppressBubble() const { | 18 bool ExtensionZoomRequestClient::ShouldSuppressBubble() const { |
| 18 return FeatureProvider::GetBehaviorFeature( | 19 const Feature* feature = |
| 19 BehaviorFeature::kZoomWithoutBubble) | 20 FeatureProvider::GetBehaviorFeature(BehaviorFeature::kZoomWithoutBubble); |
| 20 ->IsAvailableToExtension(extension()) | 21 return feature && feature->IsAvailableToExtension(extension()).is_available(); |
| 21 .is_available(); | |
| 22 } | 22 } |
| 23 | 23 |
| 24 ExtensionZoomRequestClient::~ExtensionZoomRequestClient() { | 24 ExtensionZoomRequestClient::~ExtensionZoomRequestClient() { |
| 25 } | 25 } |
| 26 | 26 |
| 27 } // namespace Extensions | 27 } // namespace Extensions |
| OLD | NEW |