OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1585 Send(new ViewHostMsg_GetCPBrowsingContext(&context)); | 1585 Send(new ViewHostMsg_GetCPBrowsingContext(&context)); |
1586 return context; | 1586 return context; |
1587 } | 1587 } |
1588 | 1588 |
1589 void RenderView::AddSearchProvider(const std::string& url) { | 1589 void RenderView::AddSearchProvider(const std::string& url) { |
1590 AddGURLSearchProvider(GURL(url), | 1590 AddGURLSearchProvider(GURL(url), |
1591 false); // not autodetected | 1591 false); // not autodetected |
1592 } | 1592 } |
1593 | 1593 |
1594 ViewHostMsg_GetSearchProviderInstallState_Params | 1594 ViewHostMsg_GetSearchProviderInstallState_Params |
1595 RenderView::GetSearchProviderInstallState(const std::string& url) { | 1595 RenderView::GetSearchProviderInstallState(WebFrame* frame, |
| 1596 const std::string& url) { |
1596 GURL inquiry_url = GURL(url); | 1597 GURL inquiry_url = GURL(url); |
1597 if (inquiry_url.is_empty()) | 1598 if (inquiry_url.is_empty()) |
1598 return ViewHostMsg_GetSearchProviderInstallState_Params::Denied(); | 1599 return ViewHostMsg_GetSearchProviderInstallState_Params::Denied(); |
| 1600 |
1599 ViewHostMsg_GetSearchProviderInstallState_Params install; | 1601 ViewHostMsg_GetSearchProviderInstallState_Params install; |
1600 Send(new ViewHostMsg_GetSearchProviderInstallState(routing_id_, | 1602 Send(new ViewHostMsg_GetSearchProviderInstallState(routing_id_, |
| 1603 frame->url(), |
1601 inquiry_url, | 1604 inquiry_url, |
1602 &install)); | 1605 &install)); |
1603 return install; | 1606 return install; |
1604 } | 1607 } |
1605 | 1608 |
1606 void RenderView::OnMissingPluginStatus( | 1609 void RenderView::OnMissingPluginStatus( |
1607 WebPluginDelegateProxy* delegate, | 1610 WebPluginDelegateProxy* delegate, |
1608 int status) { | 1611 int status) { |
1609 #if defined(OS_WIN) | 1612 #if defined(OS_WIN) |
1610 if (!first_default_plugin_) { | 1613 if (!first_default_plugin_) { |
(...skipping 3885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5496 // the origins of the two domains are different. This can be treated as a | 5499 // the origins of the two domains are different. This can be treated as a |
5497 // top level navigation and routed back to the host. | 5500 // top level navigation and routed back to the host. |
5498 WebKit::WebFrame* opener = frame->opener(); | 5501 WebKit::WebFrame* opener = frame->opener(); |
5499 if (opener) { | 5502 if (opener) { |
5500 if (url.GetOrigin() != GURL(opener->url()).GetOrigin()) | 5503 if (url.GetOrigin() != GURL(opener->url()).GetOrigin()) |
5501 return true; | 5504 return true; |
5502 } | 5505 } |
5503 } | 5506 } |
5504 return false; | 5507 return false; |
5505 } | 5508 } |
OLD | NEW |