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

Side by Side Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 4924001: JavaScript to Value bridge. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix documentation. Created 10 years 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) 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/browser/renderer_host/render_view_host.h" 5 #include "chrome/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 2177 matching lines...) Expand 10 before | Expand all | Expand 10 after
2188 integration_delegate->OnInstantSupportDetermined(page_id, result); 2188 integration_delegate->OnInstantSupportDetermined(page_id, result);
2189 } 2189 }
2190 2190
2191 void RenderViewHost::OnDetectedPhishingSite(const GURL& phishing_url, 2191 void RenderViewHost::OnDetectedPhishingSite(const GURL& phishing_url,
2192 double phishing_score, 2192 double phishing_score,
2193 const SkBitmap& thumbnail) { 2193 const SkBitmap& thumbnail) {
2194 // TODO(noelutz): send an HTTP request to the client-side detection frontends 2194 // TODO(noelutz): send an HTTP request to the client-side detection frontends
2195 // to confirm that the URL is really phishing. 2195 // to confirm that the URL is really phishing.
2196 } 2196 }
2197 2197
2198 void RenderViewHost::OnScriptEvalResponse(int id, bool result) { 2198 void RenderViewHost::OnScriptEvalResponse(int id, const ListValue& result) {
2199 scoped_ptr<Value> result_value(Value::CreateBooleanValue(result)); 2199 Value* result_value;
2200 std::pair<int, Value*> details(id, result_value.get()); 2200 result.Get(0, &result_value);
2201 std::pair<int, Value*> details(id, result_value);
2201 NotificationService::current()->Notify( 2202 NotificationService::current()->Notify(
2202 NotificationType::EXECUTE_JAVASCRIPT_RESULT, 2203 NotificationType::EXECUTE_JAVASCRIPT_RESULT,
2203 Source<RenderViewHost>(this), 2204 Source<RenderViewHost>(this),
2204 Details<std::pair<int, Value*> >(&details)); 2205 Details<std::pair<int, Value*> >(&details));
2205 } 2206 }
2206 2207
2207 void RenderViewHost::OnUpdateContentRestrictions(int restrictions) { 2208 void RenderViewHost::OnUpdateContentRestrictions(int restrictions) {
2208 delegate_->UpdateContentRestrictions(restrictions); 2209 delegate_->UpdateContentRestrictions(restrictions);
2209 } 2210 }
2210 2211
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
2251 if (printer_query.get()) { 2252 if (printer_query.get()) {
2252 BrowserThread::PostTask( 2253 BrowserThread::PostTask(
2253 BrowserThread::IO, FROM_HERE, 2254 BrowserThread::IO, FROM_HERE,
2254 NewRunnableMethod(printer_query.get(), 2255 NewRunnableMethod(printer_query.get(),
2255 &printing::PrinterQuery::StopWorker)); 2256 &printing::PrinterQuery::StopWorker));
2256 } 2257 }
2257 2258
2258 // Send the printingDone msg for now. 2259 // Send the printingDone msg for now.
2259 Send(new ViewMsg_PrintingDone(routing_id(), -1, true)); 2260 Send(new ViewMsg_PrintingDone(routing_id(), -1, true));
2260 } 2261 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | chrome/browser/renderer_host/test/render_view_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698