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 "content/renderer/render_view.h" | 5 #include "content/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 4431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4442 WebKit::WebPageVisibilityStateHidden : | 4442 WebKit::WebPageVisibilityStateHidden : |
4443 WebKit::WebPageVisibilityStateVisible; | 4443 WebKit::WebPageVisibilityStateVisible; |
4444 WebKit::WebPageVisibilityState override_state = current_state; | 4444 WebKit::WebPageVisibilityState override_state = current_state; |
4445 if (content::GetContentClient()->renderer()-> | 4445 if (content::GetContentClient()->renderer()-> |
4446 ShouldOverridePageVisibilityState(this, | 4446 ShouldOverridePageVisibilityState(this, |
4447 &override_state)) | 4447 &override_state)) |
4448 return override_state; | 4448 return override_state; |
4449 return current_state; | 4449 return current_state; |
4450 } | 4450 } |
4451 | 4451 |
| 4452 void RenderView::startActivity(const WebKit::WebString& action, |
| 4453 const WebKit::WebString& type, |
| 4454 const WebKit::WebString& data, |
| 4455 int intent_id) { |
| 4456 RenderThread::current()->Send( |
| 4457 new ViewHostMsg_WebIntentDispatch(routing_id_, routing_id_, |
| 4458 action, type, data, intent_id)); |
| 4459 } |
| 4460 |
4452 bool RenderView::IsNonLocalTopLevelNavigation( | 4461 bool RenderView::IsNonLocalTopLevelNavigation( |
4453 const GURL& url, WebKit::WebFrame* frame, WebKit::WebNavigationType type) { | 4462 const GURL& url, WebKit::WebFrame* frame, WebKit::WebNavigationType type) { |
4454 // Must be a top level frame. | 4463 // Must be a top level frame. |
4455 if (frame->parent() != NULL) | 4464 if (frame->parent() != NULL) |
4456 return false; | 4465 return false; |
4457 | 4466 |
4458 // Navigations initiated within Webkit are not sent out to the external host | 4467 // Navigations initiated within Webkit are not sent out to the external host |
4459 // in the following cases. | 4468 // in the following cases. |
4460 // 1. The url scheme is not http/https | 4469 // 1. The url scheme is not http/https |
4461 // 2. The origin of the url and the opener is the same in which case the | 4470 // 2. The origin of the url and the opener is the same in which case the |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4531 } | 4540 } |
4532 #endif | 4541 #endif |
4533 | 4542 |
4534 void RenderView::OnContextMenuClosed( | 4543 void RenderView::OnContextMenuClosed( |
4535 const webkit_glue::CustomContextMenuContext& custom_context) { | 4544 const webkit_glue::CustomContextMenuContext& custom_context) { |
4536 if (custom_context.is_pepper_menu) | 4545 if (custom_context.is_pepper_menu) |
4537 pepper_delegate_.OnContextMenuClosed(custom_context); | 4546 pepper_delegate_.OnContextMenuClosed(custom_context); |
4538 else | 4547 else |
4539 context_menu_node_.reset(); | 4548 context_menu_node_.reset(); |
4540 } | 4549 } |
OLD | NEW |