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

Side by Side Diff: chrome/renderer/chrome_ppb_pdf_impl.cc

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 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 | Annotate | Revision Log
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 #include "chrome/renderer/chrome_ppb_pdf_impl.h" 5 #include "chrome/renderer/chrome_ppb_pdf_impl.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 if (!instance) 329 if (!instance)
330 return; 330 return;
331 331
332 // Only want to show an info bar if the pdf is the whole tab. 332 // Only want to show an info bar if the pdf is the whole tab.
333 if (!instance->IsFullPagePlugin()) 333 if (!instance->IsFullPagePlugin())
334 return; 334 return;
335 335
336 WebView* view = instance->container()->element().document().frame()->view(); 336 WebView* view = instance->container()->element().document().frame()->view();
337 content::RenderView* render_view = content::RenderView::FromWebView(view); 337 content::RenderView* render_view = content::RenderView::FromWebView(view);
338 render_view->Send(new ChromeViewHostMsg_PDFHasUnsupportedFeature( 338 render_view->Send(new ChromeViewHostMsg_PDFHasUnsupportedFeature(
339 render_view->GetRoutingId())); 339 render_view->GetRoutingID()));
340 } 340 }
341 341
342 void SaveAs(PP_Instance instance_id) { 342 void SaveAs(PP_Instance instance_id) {
343 PluginInstance* instance = 343 PluginInstance* instance =
344 content::GetHostGlobals()->GetInstance(instance_id); 344 content::GetHostGlobals()->GetInstance(instance_id);
345 if (!instance) 345 if (!instance)
346 return; 346 return;
347 instance->delegate()->SaveURLAs(instance->plugin_url()); 347 instance->delegate()->SaveURLAs(instance->plugin_url());
348 } 348 }
349 349
(...skipping 27 matching lines...) Expand all
377 &SaveAs, 377 &SaveAs,
378 &Print 378 &Print
379 }; 379 };
380 380
381 // static 381 // static
382 const PPB_PDF* PPB_PDF_Impl::GetInterface() { 382 const PPB_PDF* PPB_PDF_Impl::GetInterface() {
383 return &ppb_pdf; 383 return &ppb_pdf;
384 } 384 }
385 385
386 } // namespace chrome 386 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/chrome_render_view_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698