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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 10584042: Bring up a content settings icon for ungestured registerProtocolHandler call. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments. Move to radio buttons Created 8 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 5567 matching lines...) Expand 10 before | Expand all | Expand 10 after
5578 const WebString& base_url, 5578 const WebString& base_url,
5579 const WebString& url, 5579 const WebString& url,
5580 const WebString& title) { 5580 const WebString& title) {
5581 bool user_gesture = (webview()->focusedFrame() && 5581 bool user_gesture = (webview()->focusedFrame() &&
5582 webview()->focusedFrame()->isProcessingUserGesture()); 5582 webview()->focusedFrame()->isProcessingUserGesture());
5583 GURL base(base_url); 5583 GURL base(base_url);
5584 GURL absolute_url = base.Resolve(UTF16ToUTF8(url)); 5584 GURL absolute_url = base.Resolve(UTF16ToUTF8(url));
5585 if (base.GetOrigin() != absolute_url.GetOrigin()) { 5585 if (base.GetOrigin() != absolute_url.GetOrigin()) {
5586 return; 5586 return;
5587 } 5587 }
5588 LOG(INFO) << "Got RPH in RenderViewImpl";
5588 Send(new ViewHostMsg_RegisterProtocolHandler(routing_id_, 5589 Send(new ViewHostMsg_RegisterProtocolHandler(routing_id_,
5589 UTF16ToUTF8(scheme), 5590 UTF16ToUTF8(scheme),
5590 absolute_url, 5591 absolute_url,
5591 title, 5592 title,
5592 user_gesture)); 5593 user_gesture));
5593 } 5594 }
5594 5595
5595 WebKit::WebPageVisibilityState RenderViewImpl::visibilityState() const { 5596 WebKit::WebPageVisibilityState RenderViewImpl::visibilityState() const {
5596 WebKit::WebPageVisibilityState current_state = is_hidden() ? 5597 WebKit::WebPageVisibilityState current_state = is_hidden() ?
5597 WebKit::WebPageVisibilityStateHidden : 5598 WebKit::WebPageVisibilityStateHidden :
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
5677 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5678 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5678 return !!RenderThreadImpl::current()->compositor_thread(); 5679 return !!RenderThreadImpl::current()->compositor_thread();
5679 } 5680 }
5680 5681
5681 void RenderViewImpl::OnJavaBridgeInit() { 5682 void RenderViewImpl::OnJavaBridgeInit() {
5682 DCHECK(!java_bridge_dispatcher_); 5683 DCHECK(!java_bridge_dispatcher_);
5683 #if defined(ENABLE_JAVA_BRIDGE) 5684 #if defined(ENABLE_JAVA_BRIDGE)
5684 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5685 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5685 #endif 5686 #endif
5686 } 5687 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698