2016-01-19 21:09:01 +01:00
|
|
|
// Copyright 2016 The Chromium Embedded Framework Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be found
|
|
|
|
// in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_BROWSER_VIEWS_BASIC_LABEL_BUTTON_VIEW_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_VIEWS_BASIC_LABEL_BUTTON_VIEW_H_
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "include/views/cef_button_delegate.h"
|
|
|
|
|
|
|
|
#include "libcef/browser/views/label_button_view.h"
|
|
|
|
|
|
|
|
#include "ui/views/controls/button/label_button.h"
|
|
|
|
|
|
|
|
// Extend views::LabelButton with a no-argument constructor as required by the
|
|
|
|
// CefViewView template and extend views::ButtonListener as required by the
|
|
|
|
// CefButtonView template.
|
2017-05-17 11:29:28 +02:00
|
|
|
class LabelButtonEx : public views::LabelButton, public views::ButtonListener {
|
2016-01-19 21:09:01 +01:00
|
|
|
public:
|
2017-05-17 11:29:28 +02:00
|
|
|
LabelButtonEx() : views::LabelButton(this, base::string16()) {}
|
2016-01-19 21:09:01 +01:00
|
|
|
};
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
class CefBasicLabelButtonView
|
|
|
|
: public CefLabelButtonView<LabelButtonEx, CefButtonDelegate> {
|
2016-01-19 21:09:01 +01:00
|
|
|
public:
|
|
|
|
typedef CefLabelButtonView<LabelButtonEx, CefButtonDelegate> ParentClass;
|
|
|
|
|
|
|
|
// |cef_delegate| may be nullptr.
|
|
|
|
explicit CefBasicLabelButtonView(CefButtonDelegate* cef_delegate);
|
|
|
|
|
|
|
|
private:
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(CefBasicLabelButtonView);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_VIEWS_BASIC_LABEL_BUTTON_VIEW_H_
|