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

Side by Side Diff: components/pdf/renderer/pepper_pdf_host.cc

Issue 2612653002: Prefix Did{Start|Stop}Loading methods. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | content/public/renderer/render_frame.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/pdf/renderer/pepper_pdf_host.h" 5 #include "components/pdf/renderer/pepper_pdf_host.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "components/pdf/common/pdf_messages.h" 8 #include "components/pdf/common/pdf_messages.h"
9 #include "components/pdf/renderer/pdf_accessibility_tree.h" 9 #include "components/pdf/renderer/pdf_accessibility_tree.h"
10 #include "content/public/common/referrer.h" 10 #include "content/public/common/referrer.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 PPAPI_END_MESSAGE_MAP() 94 PPAPI_END_MESSAGE_MAP()
95 return PP_ERROR_FAILED; 95 return PP_ERROR_FAILED;
96 } 96 }
97 97
98 int32_t PepperPDFHost::OnHostMsgDidStartLoading( 98 int32_t PepperPDFHost::OnHostMsgDidStartLoading(
99 ppapi::host::HostMessageContext* context) { 99 ppapi::host::HostMessageContext* context) {
100 content::RenderFrame* render_frame = GetRenderFrame(); 100 content::RenderFrame* render_frame = GetRenderFrame();
101 if (!render_frame) 101 if (!render_frame)
102 return PP_ERROR_FAILED; 102 return PP_ERROR_FAILED;
103 103
104 render_frame->DidStartLoading(); 104 render_frame->PluginDidStartLoading();
105 return PP_OK; 105 return PP_OK;
106 } 106 }
107 107
108 int32_t PepperPDFHost::OnHostMsgDidStopLoading( 108 int32_t PepperPDFHost::OnHostMsgDidStopLoading(
109 ppapi::host::HostMessageContext* context) { 109 ppapi::host::HostMessageContext* context) {
110 content::RenderFrame* render_frame = GetRenderFrame(); 110 content::RenderFrame* render_frame = GetRenderFrame();
111 if (!render_frame) 111 if (!render_frame)
112 return PP_ERROR_FAILED; 112 return PP_ERROR_FAILED;
113 113
114 render_frame->DidStopLoading(); 114 render_frame->PluginDidStopLoading();
115 return PP_OK; 115 return PP_OK;
116 } 116 }
117 117
118 int32_t PepperPDFHost::OnHostMsgSetContentRestriction( 118 int32_t PepperPDFHost::OnHostMsgSetContentRestriction(
119 ppapi::host::HostMessageContext* context, 119 ppapi::host::HostMessageContext* context,
120 int restrictions) { 120 int restrictions) {
121 content::RenderFrame* render_frame = GetRenderFrame(); 121 content::RenderFrame* render_frame = GetRenderFrame();
122 if (!render_frame) 122 if (!render_frame)
123 return PP_ERROR_FAILED; 123 return PP_ERROR_FAILED;
124 124
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 235 }
236 } 236 }
237 237
238 content::RenderFrame* PepperPDFHost::GetRenderFrame() { 238 content::RenderFrame* PepperPDFHost::GetRenderFrame() {
239 content::PepperPluginInstance* instance = 239 content::PepperPluginInstance* instance =
240 host_->GetPluginInstance(pp_instance()); 240 host_->GetPluginInstance(pp_instance());
241 return instance ? instance->GetRenderFrame() : nullptr; 241 return instance ? instance->GetRenderFrame() : nullptr;
242 } 242 }
243 243
244 } // namespace pdf 244 } // namespace pdf
OLDNEW
« no previous file with comments | « no previous file | content/public/renderer/render_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698