| Index: chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc
|
| diff --git a/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc b/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc
|
| index b8ccbd8fbbaff98432cb699efaba80a3df5a7d9d..55176d26af03b7028f217e46ffbe71a3c6690eab 100644
|
| --- a/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc
|
| +++ b/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.h"
|
|
|
| +#include "chrome/browser/defaults.h"
|
| #include "chrome/browser/ui/aura/tab_contents/web_drag_bookmark_handler_aura.h"
|
| #include "chrome/browser/ui/sad_tab_helper.h"
|
| #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h"
|
| @@ -21,6 +22,10 @@
|
| #include "ui/views/focus/view_storage.h"
|
| #include "ui/views/widget/widget.h"
|
|
|
| +#if defined(USE_AURA)
|
| +#include "chrome/browser/ui/views/link_disambiguation/link_disambiguation_popup.h"
|
| +#endif
|
| +
|
| ChromeWebContentsViewDelegateViews::ChromeWebContentsViewDelegateViews(
|
| content::WebContents* web_contents)
|
| : ContextMenuDelegate(web_contents),
|
| @@ -166,6 +171,26 @@ void ChromeWebContentsViewDelegateViews::ShowContextMenu(
|
| params));
|
| }
|
|
|
| +void ChromeWebContentsViewDelegateViews::ShowDisambiguationPopup(
|
| + const gfx::Rect& target_rect,
|
| + const SkBitmap& zoomed_bitmap,
|
| + const gfx::NativeView content,
|
| + const base::Callback<void(ui::GestureEvent*)>& gesture_cb,
|
| + const base::Callback<void(ui::MouseEvent*)>& mouse_cb) {
|
| +#if defined(USE_AURA)
|
| + if (!browser_defaults::kShowLinkDisambiguationPopup)
|
| + return;
|
| +
|
| + link_disambiguation_popup_.reset(new LinkDisambiguationPopup);
|
| + link_disambiguation_popup_->Show(
|
| + zoomed_bitmap, target_rect, content, gesture_cb, mouse_cb);
|
| +#endif
|
| +}
|
| +
|
| +void ChromeWebContentsViewDelegateViews::HideDisambiguationPopup() {
|
| + link_disambiguation_popup_.reset();
|
| +}
|
| +
|
| void ChromeWebContentsViewDelegateViews::SizeChanged(const gfx::Size& size) {
|
| SadTabHelper* sad_tab_helper = SadTabHelper::FromWebContents(web_contents_);
|
| if (!sad_tab_helper)
|
|
|