#endif
void RenderWidgetHostViewEfl::HandleGesture(ui::GestureEvent* event) {
+ if ((event->type() == ui::ET_GESTURE_PINCH_BEGIN ||
+ event->type() == ui::ET_GESTURE_PINCH_UPDATE ||
+ event->type() == ui::ET_GESTURE_PINCH_END) &&
+ (!pinch_zoom_enabled_ || eweb_view()->IsFullscreen())) {
+ event->SetHandled();
+ return;
+ }
+
blink::WebGestureEvent gesture = content::MakeWebGestureEventFromUIEvent(*event);
gesture.x = event->x();
callback_func_(obj, mhtml_content.c_str(), user_data_);
}
+bool EWebView::IsFullscreen() {
+ WebContents* web_contents = web_contents_delegate_->web_contents();
+ return web_contents_delegate_->IsFullscreenForTabOrPending(web_contents);
+}
+
void EWebView::ExitFullscreen() {
RenderViewHost* rvh = web_contents_delegate_->web_contents()->GetRenderViewHost();
if (!rvh)
bool GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* user_data);
void OnMHTMLContentGet(const std::string& mhtml_content, int callback_id);
+ bool IsFullscreen();
void ExitFullscreen();
double GetScale();
void DidChangePageScaleFactor(double scale_factor);
void WebContentsDelegateEfl::ToggleFullscreenModeForTab(WebContents* web_contents,
bool enter_fullscreen) {
+ is_fullscreen_ = enter_fullscreen;
if(enter_fullscreen)
web_view_->SmartCallback<EWebViewCallbacks::EnterFullscreen>().call();
else
web_view_->SmartCallback<EWebViewCallbacks::ExitFullscreen>().call();
}
+
+bool WebContentsDelegateEfl::IsFullscreenForTabOrPending(
+ const WebContents* web_contents) const {
+ return is_fullscreen_;
+}
+
void WebContentsDelegateEfl::RegisterProtocolHandler(WebContents* web_contents,
const std::string& protocol, const GURL& url, const string16& title, bool user_gesture) {
scoped_ptr<Ewk_Custom_Handlers_Data> protocol_data(new Ewk_Custom_Handlers_Data(protocol.c_str(), url.host().c_str(),
virtual void ToggleFullscreenModeForTab(WebContents* web_contents,
bool enter_fullscreen) OVERRIDE;
+ virtual bool IsFullscreenForTabOrPending(
+ const WebContents* web_contents) const OVERRIDE;
virtual void RequestMediaAccessPermission(
WebContents* web_contents,
const MediaStreamRequest& request,
IPC::Message* reply);
EWebView* web_view_;
+ bool is_fullscreen_;
scoped_ptr<WebContents> web_contents_;
struct ContentSecurityPolicy {