blob: e577158c9fbd0b89f22ea054d6d2bbdd81d21fe9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/gtk_theme_preview_infobar_delegate.h"
#include "chrome/browser/profile.h"
GtkThemePreviewInfobarDelegate::GtkThemePreviewInfobarDelegate(
TabContents* tab_contents,
const std::string& name,
const std::string& previous_theme,
bool previous_use_gtk_theme)
: ThemePreviewInfobarDelegate(tab_contents, name, previous_theme),
previous_use_gtk_theme_(previous_use_gtk_theme) {
}
bool GtkThemePreviewInfobarDelegate::Cancel() {
if (previous_use_gtk_theme_) {
profile()->SetNativeTheme();
return true;
} else {
return ThemePreviewInfobarDelegate::Cancel();
}
}
|