-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKaminoWebContentViewDelegate.h
57 lines (53 loc) · 1.98 KB
/
KaminoWebContentViewDelegate.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Copyright (c) 2013 The Voyjor.inc Authors. All rights reserved.
// Use of this source code is governed by a GNU-public-style license that can be
// found in the LICENSE file.
#ifndef KAMINO_WEB_CONTENT_VIEW_DELEGATE_H
#define KAMINO_WEB_CONTENT_VIEW_DELEGATE_H
#include "content\public\browser\web_contents.h"
#include "content\public\browser\web_contents_view_delegate.h"
#include "content\public\common\context_menu_params.h"
#include "content\public\browser\web_drag_dest_delegate.h"
#include <WinUser.h>
namespace content{
class KaminoWebContentViewDelegate :public WebContentsViewDelegate{
public:
enum {
KaminoContextMenuItemCutId = 10001,
KaminoContextMenuItemCopyId,
KaminoContextMenuItemSearchId,
KaminoContextMenuItemImageSearchId,
KaminoContextMenuItemYtSearchId,
KaminoContextMenuItemPasteId,
KaminoContextMenuItemDeleteId,
KaminoContextMenuItemOpenLinkId,
KaminoContextMenuItemSaveImageAsId,
KaminoContextMenuItemSaveLinkAsId,
KaminoContextMenuItemCopyLinkId,
KaminoContextMenuItemBackId,
KaminoContextMenuItemForwardId,
KaminoContextMenuItemReloadId,
KaminoContextMenuItemRecentlyClosedId,
KaminoContentMenuItemLikeId,
KaminoContentMenuItemLikesId,
KaminoContextMenuItemCopyPageURLId,
KaminoContextMenuItemIncognitoId,
KaminoContextMenuItemNewWindowId
};
KaminoWebContentViewDelegate(WebContents *content);
~KaminoWebContentViewDelegate(void);
WebDragDestDelegate* GetDragDestDelegate();
void MakeContextMenuItem(HMENU menu, int menu_index, LPTSTR text, UINT id, bool enabled);
void MenuItemSelected(int selection);
void ShowContextMenu(const ContextMenuParams& params) OVERRIDE;
void StoreFocus() OVERRIDE;
void RestoreFocus() OVERRIDE;
bool Focus() OVERRIDE;
void TakeFocus(bool reverse) OVERRIDE;
void SizeChanged(const gfx::Size& size) OVERRIDE;
WebContents *web_content;
ContextMenuParams params_;
HANDLE clipboard_mem;
DISALLOW_COPY_AND_ASSIGN(KaminoWebContentViewDelegate);
};
}
#endif;