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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_embedder.h

Issue 597753003: Implement find in page support for top level BrowserPlugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 // A BrowserPluginEmbedder handles messages coming from a BrowserPlugin's 5 // A BrowserPluginEmbedder handles messages coming from a BrowserPlugin's
6 // embedder that are not directed at any particular existing guest process. 6 // embedder that are not directed at any particular existing guest process.
7 // In the beginning, when a BrowserPlugin instance in the embedder renderer 7 // In the beginning, when a BrowserPlugin instance in the embedder renderer
8 // process requests an initial navigation, the WebContents for that renderer 8 // process requests an initial navigation, the WebContents for that renderer
9 // renderer creates a BrowserPluginEmbedder for itself. The 9 // renderer creates a BrowserPluginEmbedder for itself. The
10 // BrowserPluginEmbedder, in turn, forwards the requests to a 10 // BrowserPluginEmbedder, in turn, forwards the requests to a
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 void StartDrag(BrowserPluginGuest* guest); 64 void StartDrag(BrowserPluginGuest* guest);
65 65
66 // Sends EndSystemDrag message to the guest that initiated the last drag/drop 66 // Sends EndSystemDrag message to the guest that initiated the last drag/drop
67 // operation, if there's any. 67 // operation, if there's any.
68 void SystemDragEnded(); 68 void SystemDragEnded();
69 69
70 // Used to handle special keyboard events. 70 // Used to handle special keyboard events.
71 bool HandleKeyboardEvent(const NativeWebKeyboardEvent& event); 71 bool HandleKeyboardEvent(const NativeWebKeyboardEvent& event);
72 72
73 bool Find(int request_id,
74 const base::string16& search_text,
75 const blink::WebFindOptions& options);
73 private: 76 private:
74 explicit BrowserPluginEmbedder(WebContentsImpl* web_contents); 77 explicit BrowserPluginEmbedder(WebContentsImpl* web_contents);
75 78
76 BrowserPluginGuestManager* GetBrowserPluginGuestManager() const; 79 BrowserPluginGuestManager* GetBrowserPluginGuestManager() const;
77 80
78 void ClearGuestDragStateIfApplicable(); 81 void ClearGuestDragStateIfApplicable();
79 82
80 bool DidSendScreenRectsCallback(WebContents* guest_web_contents); 83 bool DidSendScreenRectsCallback(WebContents* guest_web_contents);
81 84
82 bool SetZoomLevelCallback(double level, WebContents* guest_web_contents); 85 bool UnlockMouseIfNecessaryCallback(bool* mouse_unlocked, WebContents* guest);
83 86
84 bool UnlockMouseIfNecessaryCallback(bool* mouse_unlocked, WebContents* guest); 87 bool FindInGuest(int request_id,
88 const base::string16& search_text,
89 const blink::WebFindOptions& options,
90 WebContents* guest);
85 91
86 // Message handlers. 92 // Message handlers.
87 void OnAttach(int instance_id, 93 void OnAttach(int instance_id,
88 const BrowserPluginHostMsg_Attach_Params& params); 94 const BrowserPluginHostMsg_Attach_Params& params);
89 void OnPluginAtPositionResponse(int instance_id, 95 void OnPluginAtPositionResponse(int instance_id,
90 int request_id, 96 int request_id,
91 const gfx::Point& position); 97 const gfx::Point& position);
92 98
93 // Used to correctly update the cursor when dragging over a guest, and to 99 // Used to correctly update the cursor when dragging over a guest, and to
94 // handle a race condition when dropping onto the guest that started the drag 100 // handle a race condition when dropping onto the guest that started the drag
(...skipping 10 matching lines...) Expand all
105 bool guest_drag_ending_; 111 bool guest_drag_ending_;
106 112
107 base::WeakPtrFactory<BrowserPluginEmbedder> weak_ptr_factory_; 113 base::WeakPtrFactory<BrowserPluginEmbedder> weak_ptr_factory_;
108 114
109 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); 115 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder);
110 }; 116 };
111 117
112 } // namespace content 118 } // namespace content
113 119
114 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ 120 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698