Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <cmath> | 8 #include <cmath> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 5664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5675 void RenderView::zoomLevelChanged() { | 5675 void RenderView::zoomLevelChanged() { |
| 5676 bool remember = !webview()->mainFrame()->document().isPluginDocument(); | 5676 bool remember = !webview()->mainFrame()->document().isPluginDocument(); |
| 5677 | 5677 |
| 5678 // Tell the browser which url got zoomed so it can update the menu and the | 5678 // Tell the browser which url got zoomed so it can update the menu and the |
| 5679 // saved values if necessary | 5679 // saved values if necessary |
| 5680 Send(new ViewHostMsg_DidZoomURL( | 5680 Send(new ViewHostMsg_DidZoomURL( |
| 5681 routing_id_, webview()->zoomLevel(), remember, | 5681 routing_id_, webview()->zoomLevel(), remember, |
| 5682 GURL(webview()->mainFrame()->url()))); | 5682 GURL(webview()->mainFrame()->url()))); |
| 5683 } | 5683 } |
| 5684 | 5684 |
| 5685 void RenderView::registerProtocolHandler(const WebString& scheme, | |
| 5686 const WebString& baseUrl, | |
| 5687 const WebString& url, | |
|
tony
2011/02/07 20:51:45
indenting is weird. what is baseUrl? Can we pass
koz (OOO until 15th September)
2011/02/13 22:33:48
baseURL is the baseURI of the document of the page
| |
| 5688 const WebString& title) { | |
| 5689 RenderThread::current()->Send( | |
| 5690 new ViewHostMsg_RegisterProtocolHandler( | |
| 5691 routing_id_, UTF16ToUTF8(scheme), UTF16ToUTF8(url), UTF16ToUTF8(title))); | |
| 5692 } | |
| 5693 | |
| 5685 bool RenderView::IsNonLocalTopLevelNavigation( | 5694 bool RenderView::IsNonLocalTopLevelNavigation( |
| 5686 const GURL& url, WebKit::WebFrame* frame, WebKit::WebNavigationType type) { | 5695 const GURL& url, WebKit::WebFrame* frame, WebKit::WebNavigationType type) { |
| 5687 // Must be a top level frame. | 5696 // Must be a top level frame. |
| 5688 if (frame->parent() != NULL) | 5697 if (frame->parent() != NULL) |
| 5689 return false; | 5698 return false; |
| 5690 | 5699 |
| 5691 // Navigations initiated within Webkit are not sent out to the external host | 5700 // Navigations initiated within Webkit are not sent out to the external host |
| 5692 // in the following cases. | 5701 // in the following cases. |
| 5693 // 1. The url scheme is not http/https | 5702 // 1. The url scheme is not http/https |
| 5694 // 2. There is no opener and this is not the first url being opened by this | 5703 // 2. There is no opener and this is not the first url being opened by this |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5782 } | 5791 } |
| 5783 } | 5792 } |
| 5784 | 5793 |
| 5785 void RenderView::OnContextMenuClosed( | 5794 void RenderView::OnContextMenuClosed( |
| 5786 const webkit_glue::CustomContextMenuContext& custom_context) { | 5795 const webkit_glue::CustomContextMenuContext& custom_context) { |
| 5787 if (custom_context.is_pepper_menu) | 5796 if (custom_context.is_pepper_menu) |
| 5788 pepper_delegate_.OnContextMenuClosed(custom_context); | 5797 pepper_delegate_.OnContextMenuClosed(custom_context); |
| 5789 else | 5798 else |
| 5790 context_menu_node_.reset(); | 5799 context_menu_node_.reset(); |
| 5791 } | 5800 } |
| OLD | NEW |