Expose NativeWindow.setThumbarButtons API to all platforms.
This commit is contained in:
parent
78eac4116c
commit
2f1cb8b52a
10 changed files with 35 additions and 52 deletions
|
@ -23,10 +23,6 @@
|
|||
#include "ui/gfx/image/image.h"
|
||||
#include "ui/gfx/image/image_skia.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include "atom/browser/ui/win/thumbar_host.h"
|
||||
#endif
|
||||
|
||||
class SkRegion;
|
||||
|
||||
namespace base {
|
||||
|
@ -63,7 +59,15 @@ struct DraggableRegion;
|
|||
class NativeWindow : public content::WebContentsObserver,
|
||||
public brightray::InspectableWebContentsViewDelegate {
|
||||
public:
|
||||
typedef base::Callback<void(const SkBitmap& bitmap)> CapturePageCallback;
|
||||
using CapturePageCallback = base::Callback<void(const SkBitmap& bitmap)>;
|
||||
using ThumbarButtonClickedCallback = base::Closure;
|
||||
|
||||
struct ThumbarButton {
|
||||
std::string tooltip;
|
||||
gfx::Image icon;
|
||||
std::vector<std::string> flags;
|
||||
ThumbarButtonClickedCallback clicked_callback;
|
||||
};
|
||||
|
||||
class DialogScope {
|
||||
public:
|
||||
|
@ -148,10 +152,8 @@ class NativeWindow : public content::WebContentsObserver,
|
|||
const std::string& description) = 0;
|
||||
virtual void SetVisibleOnAllWorkspaces(bool visible) = 0;
|
||||
virtual bool IsVisibleOnAllWorkspaces() = 0;
|
||||
#if defined(OS_WIN)
|
||||
virtual bool SetThumbarButtons(
|
||||
const std::vector<ThumbarHost::ThumbarButton>& buttons) = 0;
|
||||
#endif
|
||||
const std::vector<ThumbarButton>& buttons);
|
||||
|
||||
virtual bool IsClosed() const { return is_closed_; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue