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

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

Issue 115419: extensions chrome.self.getViews() (Closed)
Patch Set: remove line Created 11 years, 7 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 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1525 } 1525 }
1526 1526
1527 void RenderView::DocumentElementAvailable(WebFrame* frame) { 1527 void RenderView::DocumentElementAvailable(WebFrame* frame) {
1528 // TODO(mpcomplete): remove this before Chrome extensions ship. 1528 // TODO(mpcomplete): remove this before Chrome extensions ship.
1529 // HACK. This is a temporary workaround to allow cross-origin XHR for Chrome 1529 // HACK. This is a temporary workaround to allow cross-origin XHR for Chrome
1530 // extensions. It grants full access to every origin, when we really want 1530 // extensions. It grants full access to every origin, when we really want
1531 // to be able to restrict them more specifically. 1531 // to be able to restrict them more specifically.
1532 if (frame->GetURL().SchemeIs(chrome::kExtensionScheme)) 1532 if (frame->GetURL().SchemeIs(chrome::kExtensionScheme))
1533 frame->GrantUniversalAccess(); 1533 frame->GrantUniversalAccess();
1534 1534
1535 // Tell extensions to self-register their js contexts.
1536 // TODO:(rafaelw): This is kind of gross. We need a way to call through
1537 // the glue layer to retrieve the current v8::Context.
1538 if (frame->GetURL().SchemeIs(chrome::kExtensionScheme))
1539 ExtensionProcessBindings::RegisterExtensionContext(frame);
1540
1535 if (RenderThread::current()) // Will be NULL during unit tests. 1541 if (RenderThread::current()) // Will be NULL during unit tests.
1536 RenderThread::current()->user_script_slave()->InjectScripts( 1542 RenderThread::current()->user_script_slave()->InjectScripts(
1537 frame, UserScript::DOCUMENT_START); 1543 frame, UserScript::DOCUMENT_START);
1538 } 1544 }
1539 1545
1540 WindowOpenDisposition RenderView::DispositionForNavigationAction( 1546 WindowOpenDisposition RenderView::DispositionForNavigationAction(
1541 WebView* webview, 1547 WebView* webview,
1542 WebFrame* frame, 1548 WebFrame* frame,
1543 const WebRequest* request, 1549 const WebRequest* request,
1544 WebNavigationType type, 1550 WebNavigationType type,
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
3000 } 3006 }
3001 } 3007 }
3002 UMA_HISTOGRAM_TIMES("Renderer.All.StartToFinishDoc", start_to_finish_doc); 3008 UMA_HISTOGRAM_TIMES("Renderer.All.StartToFinishDoc", start_to_finish_doc);
3003 UMA_HISTOGRAM_TIMES("Renderer.All.FinishDocToFinish", finish_doc_to_finish); 3009 UMA_HISTOGRAM_TIMES("Renderer.All.FinishDocToFinish", finish_doc_to_finish);
3004 UMA_HISTOGRAM_TIMES("Renderer.All.StartToFinish", start_to_finish); 3010 UMA_HISTOGRAM_TIMES("Renderer.All.StartToFinish", start_to_finish);
3005 if (start_to_first_layout.ToInternalValue() >= 0) { 3011 if (start_to_first_layout.ToInternalValue() >= 0) {
3006 UMA_HISTOGRAM_TIMES( 3012 UMA_HISTOGRAM_TIMES(
3007 "Renderer.All.StartToFirstLayout", start_to_first_layout); 3013 "Renderer.All.StartToFirstLayout", start_to_first_layout);
3008 } 3014 }
3009 } 3015 }
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