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

Side by Side Diff: chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.h

Issue 1926173002: Erase LinkDisambiguation code on desktop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another merge conflict Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_V IEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_V IEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_V IEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_V IEWS_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "components/renderer_context_menu/context_menu_delegate.h" 12 #include "components/renderer_context_menu/context_menu_delegate.h"
13 #include "content/public/browser/web_contents_view_delegate.h" 13 #include "content/public/browser/web_contents_view_delegate.h"
14 14
15 class LinkDisambiguationPopup;
16 class RenderViewContextMenuBase; 15 class RenderViewContextMenuBase;
17 16
18 namespace aura { 17 namespace aura {
19 class Window; 18 class Window;
20 } 19 }
21 20
22 namespace content { 21 namespace content {
23 class WebContents; 22 class WebContents;
24 class WebDragDestDelegate; 23 class WebDragDestDelegate;
25 class RenderFrameHost; 24 class RenderFrameHost;
(...skipping 17 matching lines...) Expand all
43 // Overridden from WebContentsViewDelegate: 42 // Overridden from WebContentsViewDelegate:
44 gfx::NativeWindow GetNativeWindow() override; 43 gfx::NativeWindow GetNativeWindow() override;
45 content::WebDragDestDelegate* GetDragDestDelegate() override; 44 content::WebDragDestDelegate* GetDragDestDelegate() override;
46 void StoreFocus() override; 45 void StoreFocus() override;
47 void RestoreFocus() override; 46 void RestoreFocus() override;
48 bool Focus() override; 47 bool Focus() override;
49 void TakeFocus(bool reverse) override; 48 void TakeFocus(bool reverse) override;
50 void ShowContextMenu(content::RenderFrameHost* render_frame_host, 49 void ShowContextMenu(content::RenderFrameHost* render_frame_host,
51 const content::ContextMenuParams& params) override; 50 const content::ContextMenuParams& params) override;
52 void SizeChanged(const gfx::Size& size) override; 51 void SizeChanged(const gfx::Size& size) override;
53 void ShowDisambiguationPopup(
54 const gfx::Rect& target_rect,
55 const SkBitmap& zoomed_bitmap,
56 const gfx::NativeView content,
57 const base::Callback<void(ui::GestureEvent*)>& gesture_cb,
58 const base::Callback<void(ui::MouseEvent*)>& mouse_cb) override;
59 void HideDisambiguationPopup() override;
60 52
61 // Overridden from ContextMenuDelegate. 53 // Overridden from ContextMenuDelegate.
62 std::unique_ptr<RenderViewContextMenuBase> BuildMenu( 54 std::unique_ptr<RenderViewContextMenuBase> BuildMenu(
63 content::WebContents* web_contents, 55 content::WebContents* web_contents,
64 const content::ContextMenuParams& params) override; 56 const content::ContextMenuParams& params) override;
65 void ShowMenu(std::unique_ptr<RenderViewContextMenuBase> menu) override; 57 void ShowMenu(std::unique_ptr<RenderViewContextMenuBase> menu) override;
66 58
67 private: 59 private:
68 aura::Window* GetActiveNativeView(); 60 aura::Window* GetActiveNativeView();
69 views::Widget* GetTopLevelWidget(); 61 views::Widget* GetTopLevelWidget();
70 views::FocusManager* GetFocusManager(); 62 views::FocusManager* GetFocusManager();
71 void SetInitialFocus(); 63 void SetInitialFocus();
72 64
73 // The id used in the ViewStorage to store the last focused view. 65 // The id used in the ViewStorage to store the last focused view.
74 int last_focused_view_storage_id_; 66 int last_focused_view_storage_id_;
75 67
76 // The context menu is reset every time we show it, but we keep a pointer to 68 // The context menu is reset every time we show it, but we keep a pointer to
77 // between uses so that it won't go out of scope before we're done with it. 69 // between uses so that it won't go out of scope before we're done with it.
78 std::unique_ptr<RenderViewContextMenuBase> context_menu_; 70 std::unique_ptr<RenderViewContextMenuBase> context_menu_;
79 71
80 // The chrome specific delegate that receives events from WebDragDest. 72 // The chrome specific delegate that receives events from WebDragDest.
81 std::unique_ptr<content::WebDragDestDelegate> bookmark_handler_; 73 std::unique_ptr<content::WebDragDestDelegate> bookmark_handler_;
82 74
83 content::WebContents* web_contents_; 75 content::WebContents* web_contents_;
84 76
85 std::unique_ptr<LinkDisambiguationPopup> link_disambiguation_popup_;
86
87 DISALLOW_COPY_AND_ASSIGN(ChromeWebContentsViewDelegateViews); 77 DISALLOW_COPY_AND_ASSIGN(ChromeWebContentsViewDelegateViews);
88 }; 78 };
89 79
90 #endif // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGAT E_VIEWS_H_ 80 #endif // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGAT E_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698