[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / views / frame / browser_frame_common_win.cc
blob269a668f3282c70a971a8da9ed7d4b178e5056ad
1 // Copyright (c) 2013 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.
5 #include "chrome/browser/ui/views/frame/browser_frame_common_win.h"
7 #include "chrome/browser/ui/views/frame/browser_view.h"
8 #include "ui/base/theme_provider.h"
10 namespace chrome {
12 bool ShouldUseNativeFrame(const BrowserView* browser_view,
13 const ui::ThemeProvider* theme_provider) {
14 // We don't theme popup or app windows, so regardless of whether or not a
15 // theme is active for normal browser windows, we don't want to use the custom
16 // frame for popups/apps.
17 if (!browser_view->IsBrowserTypeNormal()) {
18 return true;
20 // Otherwise, we use the native frame when we're told we should by the theme
21 // provider (e.g. no custom theme is active).
22 return theme_provider->ShouldUseNativeFrame();
25 } // namespace browser