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 4265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4276 if (base.GetOrigin() != absolute_url.GetOrigin()) { | 4276 if (base.GetOrigin() != absolute_url.GetOrigin()) { |
4277 return; | 4277 return; |
4278 } | 4278 } |
4279 RenderThread::current()->Send( | 4279 RenderThread::current()->Send( |
4280 new ViewHostMsg_RegisterProtocolHandler(routing_id_, | 4280 new ViewHostMsg_RegisterProtocolHandler(routing_id_, |
4281 UTF16ToUTF8(scheme), | 4281 UTF16ToUTF8(scheme), |
4282 absolute_url, | 4282 absolute_url, |
4283 title)); | 4283 title)); |
4284 } | 4284 } |
4285 | 4285 |
| 4286 void RenderView::registerIntentHandler(const WebString& action, |
| 4287 const WebString& type, |
| 4288 const WebString& href, |
| 4289 const WebString& title) { |
| 4290 RenderThread::current()->Send( |
| 4291 new ViewHostMsg_RegisterIntentHandler(routing_id_, |
| 4292 action, |
| 4293 type, |
| 4294 href, |
| 4295 title)); |
| 4296 } |
| 4297 |
4286 WebKit::WebPageVisibilityState RenderView::visibilityState() const { | 4298 WebKit::WebPageVisibilityState RenderView::visibilityState() const { |
4287 WebKit::WebPageVisibilityState current_state = is_hidden() ? | 4299 WebKit::WebPageVisibilityState current_state = is_hidden() ? |
4288 WebKit::WebPageVisibilityStateHidden : | 4300 WebKit::WebPageVisibilityStateHidden : |
4289 WebKit::WebPageVisibilityStateVisible; | 4301 WebKit::WebPageVisibilityStateVisible; |
4290 WebKit::WebPageVisibilityState override_state = current_state; | 4302 WebKit::WebPageVisibilityState override_state = current_state; |
4291 if (content::GetContentClient()->renderer()-> | 4303 if (content::GetContentClient()->renderer()-> |
4292 ShouldOverridePageVisibilityState(this, | 4304 ShouldOverridePageVisibilityState(this, |
4293 &override_state)) | 4305 &override_state)) |
4294 return override_state; | 4306 return override_state; |
4295 return current_state; | 4307 return current_state; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4377 } | 4389 } |
4378 #endif | 4390 #endif |
4379 | 4391 |
4380 void RenderView::OnContextMenuClosed( | 4392 void RenderView::OnContextMenuClosed( |
4381 const webkit_glue::CustomContextMenuContext& custom_context) { | 4393 const webkit_glue::CustomContextMenuContext& custom_context) { |
4382 if (custom_context.is_pepper_menu) | 4394 if (custom_context.is_pepper_menu) |
4383 pepper_delegate_.OnContextMenuClosed(custom_context); | 4395 pepper_delegate_.OnContextMenuClosed(custom_context); |
4384 else | 4396 else |
4385 context_menu_node_.reset(); | 4397 context_menu_node_.reset(); |
4386 } | 4398 } |
OLD | NEW |