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 5542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5553 void RenderView::zoomLevelChanged() { | 5553 void RenderView::zoomLevelChanged() { |
5554 bool remember = !webview()->mainFrame()->document().isPluginDocument(); | 5554 bool remember = !webview()->mainFrame()->document().isPluginDocument(); |
5555 | 5555 |
5556 // Tell the browser which url got zoomed so it can update the menu and the | 5556 // Tell the browser which url got zoomed so it can update the menu and the |
5557 // saved values if necessary | 5557 // saved values if necessary |
5558 Send(new ViewHostMsg_DidZoomURL( | 5558 Send(new ViewHostMsg_DidZoomURL( |
5559 routing_id_, webview()->zoomLevel(), remember, | 5559 routing_id_, webview()->zoomLevel(), remember, |
5560 GURL(webview()->mainFrame()->url()))); | 5560 GURL(webview()->mainFrame()->url()))); |
5561 } | 5561 } |
5562 | 5562 |
| 5563 bool RenderView::isWebCopyCutEnabled() { |
| 5564 bool enabled = false; |
| 5565 Send(new ViewHostMsg_IsWebCopyCutEnabled(routing_id_, &enabled)); |
| 5566 return enabled; |
| 5567 } |
| 5568 |
| 5569 bool RenderView::isWebPasteEnabled() { |
| 5570 bool enabled = false; |
| 5571 Send(new ViewHostMsg_IsWebPasteEnabled(routing_id_, &enabled)); |
| 5572 return enabled; |
| 5573 } |
| 5574 |
5563 bool RenderView::IsNonLocalTopLevelNavigation( | 5575 bool RenderView::IsNonLocalTopLevelNavigation( |
5564 const GURL& url, WebKit::WebFrame* frame, WebKit::WebNavigationType type) { | 5576 const GURL& url, WebKit::WebFrame* frame, WebKit::WebNavigationType type) { |
5565 // Must be a top level frame. | 5577 // Must be a top level frame. |
5566 if (frame->parent() != NULL) | 5578 if (frame->parent() != NULL) |
5567 return false; | 5579 return false; |
5568 | 5580 |
5569 // Navigations initiated within Webkit are not sent out to the external host | 5581 // Navigations initiated within Webkit are not sent out to the external host |
5570 // in the following cases. | 5582 // in the following cases. |
5571 // 1. The url scheme is not http/https | 5583 // 1. The url scheme is not http/https |
5572 // 2. There is no opener and this is not the first url being opened by this | 5584 // 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... |
5660 } | 5672 } |
5661 } | 5673 } |
5662 | 5674 |
5663 void RenderView::OnContextMenuClosed( | 5675 void RenderView::OnContextMenuClosed( |
5664 const webkit_glue::CustomContextMenuContext& custom_context) { | 5676 const webkit_glue::CustomContextMenuContext& custom_context) { |
5665 if (custom_context.is_pepper_menu) | 5677 if (custom_context.is_pepper_menu) |
5666 pepper_delegate_.OnContextMenuClosed(custom_context); | 5678 pepper_delegate_.OnContextMenuClosed(custom_context); |
5667 else | 5679 else |
5668 context_menu_node_.reset(); | 5680 context_menu_node_.reset(); |
5669 } | 5681 } |
OLD | NEW |