Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: extensions/browser/extension_zoom_request_client.cc

Issue 1835863002: Added check for behavior feature existense (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_provider.h" 8 #include "extensions/common/features/feature_provider.h"
9 9
10 namespace extensions { 10 namespace extensions {
11 11
12 ExtensionZoomRequestClient::ExtensionZoomRequestClient( 12 ExtensionZoomRequestClient::ExtensionZoomRequestClient(
13 scoped_refptr<const Extension> extension) 13 scoped_refptr<const Extension> extension)
14 : extension_(extension) { 14 : extension_(extension) {
15 } 15 }
16 16
17 bool ExtensionZoomRequestClient::ShouldSuppressBubble() const { 17 bool ExtensionZoomRequestClient::ShouldSuppressBubble() const {
18 return FeatureProvider::GetBehaviorFeature( 18 return FeatureProvider::BehaviorFeatureIsAvailable(
19 BehaviorFeature::kZoomWithoutBubble) 19 BehaviorFeature::kZoomWithoutBubble, extension());
20 ->IsAvailableToExtension(extension())
21 .is_available();
22 } 20 }
23 21
24 ExtensionZoomRequestClient::~ExtensionZoomRequestClient() { 22 ExtensionZoomRequestClient::~ExtensionZoomRequestClient() {
25 } 23 }
26 24
27 } // namespace Extensions 25 } // namespace Extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698