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_IMPL_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_VIEWS_BASIC_LABEL_BUTTON_IMPL_H_
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "include/views/cef_button_delegate.h"
|
2017-05-17 11:29:28 +02:00
|
|
|
#include "include/views/cef_label_button.h"
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
#include "libcef/browser/views/label_button_impl.h"
|
|
|
|
|
|
|
|
#include "ui/views/controls/button/label_button.h"
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
class CefBasicLabelButtonImpl : public CefLabelButtonImpl<views::LabelButton,
|
|
|
|
CefLabelButton,
|
|
|
|
CefButtonDelegate> {
|
2016-01-19 21:09:01 +01:00
|
|
|
public:
|
2017-05-17 11:29:28 +02:00
|
|
|
typedef CefLabelButtonImpl<views::LabelButton,
|
|
|
|
CefLabelButton,
|
|
|
|
CefButtonDelegate>
|
|
|
|
ParentClass;
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
// Create a new CefLabelButton instance. |delegate| may be nullptr.
|
|
|
|
static CefRefPtr<CefBasicLabelButtonImpl> Create(
|
|
|
|
CefRefPtr<CefButtonDelegate> delegate,
|
|
|
|
const CefString& text,
|
|
|
|
bool with_frame);
|
|
|
|
|
|
|
|
// CefViewAdapter methods:
|
|
|
|
std::string GetDebugType() override { return "LabelButton"; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
// Create a new implementation object.
|
|
|
|
// Always call Initialize() after creation.
|
|
|
|
// |delegate| may be nullptr.
|
|
|
|
explicit CefBasicLabelButtonImpl(CefRefPtr<CefButtonDelegate> delegate);
|
|
|
|
|
|
|
|
// CefViewImpl methods:
|
|
|
|
views::LabelButton* CreateRootView() override;
|
2016-07-21 23:21:32 +02:00
|
|
|
void InitializeRootView() override;
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(CefBasicLabelButtonImpl);
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(CefBasicLabelButtonImpl);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_VIEWS_BASIC_LABEL_BUTTON_IMPL_H_
|