browser: handle flash context menu

This commit is contained in:
Robo 2015-10-31 19:09:07 +05:30
parent cb91d4487b
commit c969052f12
10 changed files with 177 additions and 22 deletions

View file

@ -13,6 +13,7 @@
#include "atom/browser/api/trackable_object.h"
#include "atom/browser/common_web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/context_menu_params.h"
#include "content/public/common/favicon_url.h"
#include "native_mate/handle.h"
#include "ui/gfx/image/image.h"
@ -92,6 +93,8 @@ class WebContents : public mate::TrackableObject<WebContents>,
void SetAudioMuted(bool muted);
bool IsAudioMuted();
void Print(mate::Arguments* args);
void ExecuteContextMenuCommand(int action);
void NotifyContextMenuClosed();
// Print current page as PDF.
void PrintToPDF(const base::DictionaryValue& setting,
@ -189,6 +192,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
void ExitFullscreenModeForTab(content::WebContents* source) override;
void RendererUnresponsive(content::WebContents* source) override;
void RendererResponsive(content::WebContents* source) override;
bool HandleContextMenu(const content::ContextMenuParams& params) override;
// content::WebContentsObserver:
void BeforeUnloadFired(const base::TimeTicks& proceed_time) override;
@ -255,6 +259,9 @@ class WebContents : public mate::TrackableObject<WebContents>,
// embedders' zoom level change.
void OnZoomLevelChanged(double level);
// Recent unhandled context menu context.
content::CustomContextMenuContext context_menu_context_;
v8::Global<v8::Value> session_;
v8::Global<v8::Value> devtools_web_contents_;