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

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

Issue 2827047: Make RenderView call the plugin through WebKit::WebPlugin (instead of casting... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: compile until webkit is rolled Created 10 years, 5 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
« no previous file with comments | « chrome/renderer/pepper_plugin_delegate_impl.h ('k') | chrome/renderer/render_view.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/pepper_plugin_delegate_impl.h" 5 #include "chrome/renderer/pepper_plugin_delegate_impl.h"
6 6
7 #include "app/surface/transport_dib.h" 7 #include "app/surface/transport_dib.h"
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "chrome/renderer/render_view.h"
9 #include "webkit/glue/plugins/pepper_plugin_instance.h" 10 #include "webkit/glue/plugins/pepper_plugin_instance.h"
10 11
11 #if defined(OS_MACOSX) 12 #if defined(OS_MACOSX)
12 #include "chrome/common/render_messages.h" 13 #include "chrome/common/render_messages.h"
13 #include "chrome/renderer/render_thread.h" 14 #include "chrome/renderer/render_thread.h"
14 #endif 15 #endif
15 16
16 namespace { 17 namespace {
17 18
18 // Implements the Image2D using a TransportDIB. 19 // Implements the Image2D using a TransportDIB.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 TransportDIB* dib = TransportDIB::Map(dib_handle); 125 TransportDIB* dib = TransportDIB::Map(dib_handle);
125 #else 126 #else
126 static int next_dib_id = 0; 127 static int next_dib_id = 0;
127 TransportDIB* dib = TransportDIB::Create(buffer_size, next_dib_id++); 128 TransportDIB* dib = TransportDIB::Create(buffer_size, next_dib_id++);
128 if (!dib) 129 if (!dib)
129 return NULL; 130 return NULL;
130 #endif 131 #endif
131 132
132 return new PlatformImage2DImpl(width, height, dib); 133 return new PlatformImage2DImpl(width, height, dib);
133 } 134 }
135
136 void PepperPluginDelegateImpl::DidChangeNumberOfFindResults(int identifier,
137 int total,
138 bool final_result) {
139 if (total == 0) {
140 render_view_->ReportNoFindInPageResults(identifier);
141 } else {
142 render_view_->reportFindInPageMatchCount(identifier, total, final_result);
143 }
144 }
145
146 void PepperPluginDelegateImpl::DidChangeSelectedFindResult(int identifier,
147 int index) {
148 render_view_->reportFindInPageSelection(
149 identifier, index + 1, WebKit::WebRect());
150 }
OLDNEW
« no previous file with comments | « chrome/renderer/pepper_plugin_delegate_impl.h ('k') | chrome/renderer/render_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698