#ifndef CHROME_BROWSER_UI_WEBUI_ASH_MAKO_MAKO_REWRITE_VIEW_H_
#define CHROME_BROWSER_UI_WEBUI_ASH_MAKO_MAKO_REWRITE_VIEW_H_
#include "chrome/browser/ui/webui/ash/mako/draggable_bubble_dialog_view.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/views/controls/webview/webview.h"
#include "ui/views/view.h"
namespace ash {
class MakoRewriteView : public DraggableBubbleDialogView {
METADATA_HEADER(MakoRewriteView, WebUIBubbleDialogView)
public:
MakoRewriteView(WebUIContentsWrapper* contents_wrapper,
const gfx::Rect& caret_bounds,
bool can_fallback_to_center_position);
MakoRewriteView(const MakoRewriteView&) = delete;
MakoRewriteView& operator=(const MakoRewriteView&) = delete;
~MakoRewriteView() override;
void ResizeDueToAutoResize(content::WebContents* source,
const gfx::Size& new_size) override;
void ShowUI() override;
void SetContentsBounds(content::WebContents* source,
const gfx::Rect& new_size) override;
bool IsDraggingEnabled() override;
bool IsResizingEnabled() override;
bool HandleKeyboardEvent(content::WebContents* source,
const input::NativeWebKeyboardEvent& event) override;
private:
gfx::Rect caret_bounds_;
bool resizing_initialized_;
bool content_bounds_updated_by_webui_;
bool can_fallback_to_center_position_;
void SetupResizingSupport();
};
}
#endif