OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_ |
6 #define CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_ | 6 #define CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_ |
7 | 7 |
8 #include "content/public/browser/web_contents.h" | 8 #include "content/public/browser/web_contents.h" |
9 #include "content/public/browser/web_contents_view_delegate.h" | 9 #include "content/public/browser/web_contents_view_delegate.h" |
10 #include "content/public/common/context_menu_params.h" | 10 #include "content/public/common/context_menu_params.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 class ShellWebContentsViewDelegate : public WebContentsViewDelegate { | 14 class ShellWebContentsViewDelegate : public WebContentsViewDelegate { |
15 public: | 15 public: |
16 explicit ShellWebContentsViewDelegate(WebContents* web_contents); | 16 explicit ShellWebContentsViewDelegate(WebContents* web_contents); |
17 virtual ~ShellWebContentsViewDelegate(); | 17 virtual ~ShellWebContentsViewDelegate(); |
18 | 18 |
19 // Overridden from WebContentsViewDelegate: | 19 // Overridden from WebContentsViewDelegate: |
20 virtual void ShowContextMenu(RenderFrameHost* render_frame_host, | 20 virtual void ShowContextMenu(RenderFrameHost* render_frame_host, |
21 const ContextMenuParams& params) OVERRIDE; | 21 const ContextMenuParams& params) OVERRIDE; |
22 | 22 |
23 #if defined(OS_MACOSX) | 23 #if defined(OS_MACOSX) |
24 void ActionPerformed(int id); | 24 void ActionPerformed(int id); |
25 #elif defined(OS_WIN) | 25 #elif defined(OS_WIN) |
26 void MenuItemSelected(int selection); | 26 void MenuItemSelected(int selection); |
27 #endif | 27 #endif |
28 | 28 |
| 29 #if defined(TOOLKIT_VIEWS) |
| 30 virtual void ShowLinkDisambiguationPopup(const gfx::Rect& target_rect, |
| 31 const SkBitmap& zoomed_bitmap, |
| 32 const gfx::NativeView content, |
| 33 const GestureCallback callback) |
| 34 OVERRIDE; |
| 35 #endif |
| 36 |
29 private: | 37 private: |
30 WebContents* web_contents_; | 38 WebContents* web_contents_; |
31 ContextMenuParams params_; | 39 ContextMenuParams params_; |
32 | 40 |
33 DISALLOW_COPY_AND_ASSIGN(ShellWebContentsViewDelegate); | 41 DISALLOW_COPY_AND_ASSIGN(ShellWebContentsViewDelegate); |
34 }; | 42 }; |
35 | 43 |
36 } // namespace content | 44 } // namespace content |
37 | 45 |
38 #endif // CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_ | 46 #endif // CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_ |
OLD | NEW |