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

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

Issue 155309: Chrome-side of fixes for content-script messaging. (Closed)
Patch Set: temporary webkit hack Created 11 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
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/glue/webframeloaderclient_impl.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 // extensions. It grants full access to every origin, when we really want 1454 // extensions. It grants full access to every origin, when we really want
1455 // to be able to restrict them more specifically. 1455 // to be able to restrict them more specifically.
1456 if (frame->GetURL().SchemeIs(chrome::kExtensionScheme)) 1456 if (frame->GetURL().SchemeIs(chrome::kExtensionScheme))
1457 frame->GrantUniversalAccess(); 1457 frame->GrantUniversalAccess();
1458 1458
1459 if (RenderThread::current()) // Will be NULL during unit tests. 1459 if (RenderThread::current()) // Will be NULL during unit tests.
1460 RenderThread::current()->user_script_slave()->InjectScripts( 1460 RenderThread::current()->user_script_slave()->InjectScripts(
1461 frame, UserScript::DOCUMENT_START); 1461 frame, UserScript::DOCUMENT_START);
1462 } 1462 }
1463 1463
1464 void RenderView::DidCreateScriptContext(WebFrame* webframe) { 1464 void RenderView::DidCreateScriptContextForFrame(WebFrame* webframe) {
1465 EventBindings::HandleContextCreated(webframe); 1465 EventBindings::HandleContextCreated(webframe);
1466 } 1466 }
1467 1467
1468 void RenderView::DidDestroyScriptContext(WebFrame* webframe) { 1468 void RenderView::DidDestroyScriptContextForFrame(WebFrame* webframe) {
1469 EventBindings::HandleContextDestroyed(webframe); 1469 EventBindings::HandleContextDestroyed(webframe);
1470 } 1470 }
1471 1471
1472 void RenderView::DidCreateIsolatedScriptContext(WebFrame* webframe) {
1473 EventBindings::HandleContextCreated(webframe);
1474 }
1475
1472 WindowOpenDisposition RenderView::DispositionForNavigationAction( 1476 WindowOpenDisposition RenderView::DispositionForNavigationAction(
1473 WebView* webview, 1477 WebView* webview,
1474 WebFrame* frame, 1478 WebFrame* frame,
1475 const WebURLRequest& request, 1479 const WebURLRequest& request,
1476 WebNavigationType type, 1480 WebNavigationType type,
1477 WindowOpenDisposition disposition, 1481 WindowOpenDisposition disposition,
1478 bool is_redirect) { 1482 bool is_redirect) {
1479 // A content initiated navigation may have originated from a link-click, 1483 // A content initiated navigation may have originated from a link-click,
1480 // script, drag-n-drop operation, etc. 1484 // script, drag-n-drop operation, etc.
1481 bool is_content_initiated = 1485 bool is_content_initiated =
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after
3034 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms)); 3038 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms));
3035 } 3039 }
3036 3040
3037 void RenderView::Print(WebFrame* frame, bool script_initiated) { 3041 void RenderView::Print(WebFrame* frame, bool script_initiated) {
3038 DCHECK(frame); 3042 DCHECK(frame);
3039 if (print_helper_.get() == NULL) { 3043 if (print_helper_.get() == NULL) {
3040 print_helper_.reset(new PrintWebViewHelper(this)); 3044 print_helper_.reset(new PrintWebViewHelper(this));
3041 } 3045 }
3042 print_helper_->Print(frame, script_initiated); 3046 print_helper_->Print(frame, script_initiated);
3043 } 3047 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/glue/webframeloaderclient_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698