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

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

Issue 2700613003: Enable find-in-page across GuestViews. (Closed)
Patch Set: Created 3 years, 9 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 <utility> 7 #include <utility>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "components/guest_view/common/guest_view_constants.h" 10 #include "components/guest_view/common/guest_view_constants.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); 188 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string());
189 web_contents()->GetMainFrame()->GetInterfaceRegistry()->AddInterface( 189 web_contents()->GetMainFrame()->GetInterfaceRegistry()->AddInterface(
190 base::Bind(&MimeHandlerServiceImpl::Create, stream_->GetWeakPtr())); 190 base::Bind(&MimeHandlerServiceImpl::Create, stream_->GetWeakPtr()));
191 } 191 }
192 192
193 void MimeHandlerViewGuest::DidInitialize( 193 void MimeHandlerViewGuest::DidInitialize(
194 const base::DictionaryValue& create_params) { 194 const base::DictionaryValue& create_params) {
195 ExtensionsAPIClient::Get()->AttachWebContentsHelpers(web_contents()); 195 ExtensionsAPIClient::Get()->AttachWebContentsHelpers(web_contents());
196 } 196 }
197 197
198 bool MimeHandlerViewGuest::ShouldHandleFindRequestsForEmbedder() const {
199 return is_full_page_plugin();
200 }
201
202 bool MimeHandlerViewGuest::ZoomPropagatesFromEmbedderToGuest() const { 198 bool MimeHandlerViewGuest::ZoomPropagatesFromEmbedderToGuest() const {
203 return false; 199 return false;
204 } 200 }
205 201
206 WebContents* MimeHandlerViewGuest::OpenURLFromTab( 202 WebContents* MimeHandlerViewGuest::OpenURLFromTab(
207 WebContents* source, 203 WebContents* source,
208 const content::OpenURLParams& params) { 204 const content::OpenURLParams& params) {
209 return embedder_web_contents()->GetDelegate()->OpenURLFromTab( 205 return embedder_web_contents()->GetDelegate()->OpenURLFromTab(
210 embedder_web_contents(), params); 206 embedder_web_contents(), params);
211 } 207 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 297 }
302 } 298 }
303 299
304 base::WeakPtr<StreamContainer> MimeHandlerViewGuest::GetStream() const { 300 base::WeakPtr<StreamContainer> MimeHandlerViewGuest::GetStream() const {
305 if (!stream_) 301 if (!stream_)
306 return base::WeakPtr<StreamContainer>(); 302 return base::WeakPtr<StreamContainer>();
307 return stream_->GetWeakPtr(); 303 return stream_->GetWeakPtr();
308 } 304 }
309 305
310 } // namespace extensions 306 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698