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

Side by Side Diff: extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc

Issue 901833002: Allow MimeHandlerViewGuest to be notified of StopFinding events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_gues t.h" 5 #include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_gues t.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "content/public/browser/host_zoom_map.h" 9 #include "content/public/browser/host_zoom_map.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 bool MimeHandlerViewGuest::Find(int request_id, 165 bool MimeHandlerViewGuest::Find(int request_id,
166 const base::string16& search_text, 166 const base::string16& search_text,
167 const blink::WebFindOptions& options) { 167 const blink::WebFindOptions& options) {
168 if (is_full_page_plugin()) { 168 if (is_full_page_plugin()) {
169 web_contents()->Find(request_id, search_text, options); 169 web_contents()->Find(request_id, search_text, options);
170 return true; 170 return true;
171 } 171 }
172 return false; 172 return false;
173 } 173 }
174 174
175 bool MimeHandlerViewGuest::StopFinding(content::StopFindAction action) {
176 if (is_full_page_plugin()) {
177 web_contents()->StopFinding(action);
178 return true;
179 }
180 return false;
181 }
182
175 content::WebContents* MimeHandlerViewGuest::OpenURLFromTab( 183 content::WebContents* MimeHandlerViewGuest::OpenURLFromTab(
176 content::WebContents* source, 184 content::WebContents* source,
177 const content::OpenURLParams& params) { 185 const content::OpenURLParams& params) {
178 return embedder_web_contents()->GetDelegate()->OpenURLFromTab( 186 return embedder_web_contents()->GetDelegate()->OpenURLFromTab(
179 embedder_web_contents(), params); 187 embedder_web_contents(), params);
180 } 188 }
181 189
182 bool MimeHandlerViewGuest::HandleContextMenu( 190 bool MimeHandlerViewGuest::HandleContextMenu(
183 const content::ContextMenuParams& params) { 191 const content::ContextMenuParams& params) {
184 if (delegate_) 192 if (delegate_)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 245
238 void MimeHandlerViewGuest::OnRequest( 246 void MimeHandlerViewGuest::OnRequest(
239 const ExtensionHostMsg_Request_Params& params) { 247 const ExtensionHostMsg_Request_Params& params) {
240 if (extension_function_dispatcher_) { 248 if (extension_function_dispatcher_) {
241 extension_function_dispatcher_->Dispatch( 249 extension_function_dispatcher_->Dispatch(
242 params, web_contents()->GetRenderViewHost()); 250 params, web_contents()->GetRenderViewHost());
243 } 251 }
244 } 252 }
245 253
246 } // namespace extensions 254 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698