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

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

Issue 179027: Make a bunch of backlogged breaking changes to the extensions (Closed)
Patch Set: Put chrome.self back Created 11 years, 3 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
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 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 dom_ui_bindings_.BindToJavascript(frame, L"chrome"); 1560 dom_ui_bindings_.BindToJavascript(frame, L"chrome");
1561 } 1561 }
1562 if (BindingsPolicy::is_external_host_enabled(enabled_bindings_)) { 1562 if (BindingsPolicy::is_external_host_enabled(enabled_bindings_)) {
1563 external_host_bindings_.set_message_sender(this); 1563 external_host_bindings_.set_message_sender(this);
1564 external_host_bindings_.set_routing_id(routing_id_); 1564 external_host_bindings_.set_routing_id(routing_id_);
1565 external_host_bindings_.BindToJavascript(frame, L"externalHost"); 1565 external_host_bindings_.BindToJavascript(frame, L"externalHost");
1566 } 1566 }
1567 } 1567 }
1568 1568
1569 void RenderView::DocumentElementAvailable(WebFrame* frame) { 1569 void RenderView::DocumentElementAvailable(WebFrame* frame) {
1570 // TODO(aa): Remove this before dev release.
1571 GURL url = frame->url();
1572 if (url.SchemeIs(chrome::kExtensionScheme))
1573 frame->grantUniversalAccess();
1574
1575 if (RenderThread::current()) // Will be NULL during unit tests. 1570 if (RenderThread::current()) // Will be NULL during unit tests.
1576 RenderThread::current()->user_script_slave()->InjectScripts( 1571 RenderThread::current()->user_script_slave()->InjectScripts(
1577 frame, UserScript::DOCUMENT_START); 1572 frame, UserScript::DOCUMENT_START);
1578 1573
1579 // Notify the browser about non-blank documents loading in the top frame. 1574 // Notify the browser about non-blank documents loading in the top frame.
1575 GURL url = frame->url();
1580 if (url.is_valid() && url.spec() != "about:blank") { 1576 if (url.is_valid() && url.spec() != "about:blank") {
1581 if (frame == webview()->GetMainFrame()) 1577 if (frame == webview()->GetMainFrame())
1582 Send(new ViewHostMsg_DocumentAvailableInMainFrame(routing_id_)); 1578 Send(new ViewHostMsg_DocumentAvailableInMainFrame(routing_id_));
1583 } 1579 }
1584 } 1580 }
1585 1581
1586 void RenderView::DidCreateScriptContextForFrame(WebFrame* webframe) { 1582 void RenderView::DidCreateScriptContextForFrame(WebFrame* webframe) {
1587 EventBindings::HandleContextCreated(webframe, false); 1583 EventBindings::HandleContextCreated(webframe, false);
1588 } 1584 }
1589 1585
(...skipping 1751 matching lines...) Expand 10 before | Expand all | Expand 10 after
3341 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms)); 3337 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms));
3342 } 3338 }
3343 3339
3344 void RenderView::Print(WebFrame* frame, bool script_initiated) { 3340 void RenderView::Print(WebFrame* frame, bool script_initiated) {
3345 DCHECK(frame); 3341 DCHECK(frame);
3346 if (print_helper_.get() == NULL) { 3342 if (print_helper_.get() == NULL) {
3347 print_helper_.reset(new PrintWebViewHelper(this)); 3343 print_helper_.reset(new PrintWebViewHelper(this));
3348 } 3344 }
3349 print_helper_->Print(frame, script_initiated); 3345 print_helper_->Print(frame, script_initiated);
3350 } 3346 }
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/extension_process_bindings.cc ('k') | chrome/renderer/renderer_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698