Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc

Issue 351683002: Adds link disambiguation popup support to Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed scrolling cruft Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..686d5887a14ba58b03e570827e48966ad9343cf6 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
@@ -21,6 +21,10 @@
#include "ui/views/focus/view_storage.h"
#include "ui/views/widget/widget.h"
+#if defined(OS_WIN)
sky 2014/08/04 20:05:19 USE_AURA
luken 2014/09/11 01:07:26 Done.
+#include "chrome/browser/ui/views/link_disambiguation/link_disambiguation_popup.h"
+#endif
+
ChromeWebContentsViewDelegateViews::ChromeWebContentsViewDelegateViews(
content::WebContents* web_contents)
: ContextMenuDelegate(web_contents),
@@ -166,6 +170,22 @@ void ChromeWebContentsViewDelegateViews::ShowContextMenu(
params));
}
+#if defined(OS_WIN)
+void ChromeWebContentsViewDelegateViews::ShowDisambiguationPopup(
+ const gfx::Rect& target_rect,
+ const SkBitmap& zoomed_bitmap,
+ const gfx::NativeView content,
+ const content::WebContentsViewDelegate::GestureCallback& callback) {
+ link_disambiguation_popup_.reset(new LinkDisambiguationPopup);
sky 2014/08/04 20:05:19 Move ifdef inside body and make it USE_AURA.
luken 2014/09/11 01:07:26 Done.
+ link_disambiguation_popup_->Show(
+ zoomed_bitmap, target_rect, content, callback);
+}
+
+void ChromeWebContentsViewDelegateViews::HideDisambiguationPopup() {
+ link_disambiguation_popup_.reset();
+}
+#endif
+
void ChromeWebContentsViewDelegateViews::SizeChanged(const gfx::Size& size) {
SadTabHelper* sad_tab_helper = SadTabHelper::FromWebContents(web_contents_);
if (!sad_tab_helper)

Powered by Google App Engine
This is Rietveld 408576698