| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 #include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityObject.h" | 87 #include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityObject.h" |
| 88 #include "third_party/WebKit/WebKit/chromium/public/WebCString.h" | 88 #include "third_party/WebKit/WebKit/chromium/public/WebCString.h" |
| 89 #include "third_party/WebKit/WebKit/chromium/public/WebDataSource.h" | 89 #include "third_party/WebKit/WebKit/chromium/public/WebDataSource.h" |
| 90 #include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgent.h" | 90 #include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgent.h" |
| 91 #include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" | 91 #include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" |
| 92 #include "third_party/WebKit/WebKit/chromium/public/WebDragData.h" | 92 #include "third_party/WebKit/WebKit/chromium/public/WebDragData.h" |
| 93 #include "third_party/WebKit/WebKit/chromium/public/WebFileChooserParams.h" | 93 #include "third_party/WebKit/WebKit/chromium/public/WebFileChooserParams.h" |
| 94 #include "third_party/WebKit/WebKit/chromium/public/WebFormControlElement.h" | 94 #include "third_party/WebKit/WebKit/chromium/public/WebFormControlElement.h" |
| 95 #include "third_party/WebKit/WebKit/chromium/public/WebFormElement.h" | 95 #include "third_party/WebKit/WebKit/chromium/public/WebFormElement.h" |
| 96 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" | 96 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
| 97 #include "third_party/WebKit/WebKit/chromium/public/WebFullscreenMediaPlayerClie
nt.h" |
| 97 #include "third_party/WebKit/WebKit/chromium/public/WebHistoryItem.h" | 98 #include "third_party/WebKit/WebKit/chromium/public/WebHistoryItem.h" |
| 98 #include "third_party/WebKit/WebKit/chromium/public/WebImage.h" | 99 #include "third_party/WebKit/WebKit/chromium/public/WebImage.h" |
| 99 #include "third_party/WebKit/WebKit/chromium/public/WebInputElement.h" | 100 #include "third_party/WebKit/WebKit/chromium/public/WebInputElement.h" |
| 101 #include "third_party/WebKit/WebKit/chromium/public/WebMediaElement.h" |
| 100 #include "third_party/WebKit/WebKit/chromium/public/WebNode.h" | 102 #include "third_party/WebKit/WebKit/chromium/public/WebNode.h" |
| 101 #include "third_party/WebKit/WebKit/chromium/public/WebNodeList.h" | 103 #include "third_party/WebKit/WebKit/chromium/public/WebNodeList.h" |
| 102 #include "third_party/WebKit/WebKit/chromium/public/WebPageSerializer.h" | 104 #include "third_party/WebKit/WebKit/chromium/public/WebPageSerializer.h" |
| 103 #include "third_party/WebKit/WebKit/chromium/public/WebPlugin.h" | 105 #include "third_party/WebKit/WebKit/chromium/public/WebPlugin.h" |
| 104 #include "third_party/WebKit/WebKit/chromium/public/WebPluginContainer.h" | 106 #include "third_party/WebKit/WebKit/chromium/public/WebPluginContainer.h" |
| 105 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" | 107 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" |
| 106 #include "third_party/WebKit/WebKit/chromium/public/WebPluginDocument.h" | 108 #include "third_party/WebKit/WebKit/chromium/public/WebPluginDocument.h" |
| 107 #include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" | 109 #include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" |
| 108 #include "third_party/WebKit/WebKit/chromium/public/WebRange.h" | 110 #include "third_party/WebKit/WebKit/chromium/public/WebRange.h" |
| 109 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" | 111 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 using WebKit::WebDocument; | 182 using WebKit::WebDocument; |
| 181 using WebKit::WebDragData; | 183 using WebKit::WebDragData; |
| 182 using WebKit::WebDragOperation; | 184 using WebKit::WebDragOperation; |
| 183 using WebKit::WebDragOperationsMask; | 185 using WebKit::WebDragOperationsMask; |
| 184 using WebKit::WebEditingAction; | 186 using WebKit::WebEditingAction; |
| 185 using WebKit::WebFileChooserCompletion; | 187 using WebKit::WebFileChooserCompletion; |
| 186 using WebKit::WebFindOptions; | 188 using WebKit::WebFindOptions; |
| 187 using WebKit::WebFormControlElement; | 189 using WebKit::WebFormControlElement; |
| 188 using WebKit::WebFormElement; | 190 using WebKit::WebFormElement; |
| 189 using WebKit::WebFrame; | 191 using WebKit::WebFrame; |
| 192 using WebKit::WebFullscreenMediaPlayer; |
| 190 using WebKit::WebHistoryItem; | 193 using WebKit::WebHistoryItem; |
| 191 using WebKit::WebImage; | 194 using WebKit::WebImage; |
| 192 using WebKit::WebInputElement; | 195 using WebKit::WebInputElement; |
| 196 using WebKit::WebMediaElement; |
| 193 using WebKit::WebMediaPlayer; | 197 using WebKit::WebMediaPlayer; |
| 194 using WebKit::WebMediaPlayerAction; | 198 using WebKit::WebMediaPlayerAction; |
| 195 using WebKit::WebMediaPlayerClient; | 199 using WebKit::WebMediaPlayerClient; |
| 196 using WebKit::WebNavigationPolicy; | 200 using WebKit::WebNavigationPolicy; |
| 197 using WebKit::WebNavigationType; | 201 using WebKit::WebNavigationType; |
| 198 using WebKit::WebNode; | 202 using WebKit::WebNode; |
| 199 using WebKit::WebPageSerializer; | 203 using WebKit::WebPageSerializer; |
| 200 using WebKit::WebPageSerializerClient; | 204 using WebKit::WebPageSerializerClient; |
| 201 using WebKit::WebPlugin; | 205 using WebKit::WebPlugin; |
| 202 using WebKit::WebPluginContainer; | 206 using WebKit::WebPluginContainer; |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 #endif | 484 #endif |
| 481 | 485 |
| 482 render_thread_->RemoveFilter(audio_message_filter_); | 486 render_thread_->RemoveFilter(audio_message_filter_); |
| 483 | 487 |
| 484 #ifndef NDEBUG | 488 #ifndef NDEBUG |
| 485 // Make sure we are no longer referenced by the ViewMap. | 489 // Make sure we are no longer referenced by the ViewMap. |
| 486 ViewMap* views = Singleton<ViewMap>::get(); | 490 ViewMap* views = Singleton<ViewMap>::get(); |
| 487 for (ViewMap::iterator it = views->begin(); it != views->end(); ++it) | 491 for (ViewMap::iterator it = views->begin(); it != views->end(); ++it) |
| 488 DCHECK_NE(this, it->second) << "Failed to call Close?"; | 492 DCHECK_NE(this, it->second) << "Failed to call Close?"; |
| 489 #endif | 493 #endif |
| 494 |
| 495 DCHECK(fullscreen_widgets_.empty()); |
| 490 } | 496 } |
| 491 | 497 |
| 492 /*static*/ | 498 /*static*/ |
| 493 void RenderView::ForEach(RenderViewVisitor* visitor) { | 499 void RenderView::ForEach(RenderViewVisitor* visitor) { |
| 494 ViewMap* views = Singleton<ViewMap>::get(); | 500 ViewMap* views = Singleton<ViewMap>::get(); |
| 495 for (ViewMap::iterator it = views->begin(); it != views->end(); ++it) { | 501 for (ViewMap::iterator it = views->begin(); it != views->end(); ++it) { |
| 496 if (!visitor->Visit(it->second)) | 502 if (!visitor->Visit(it->second)) |
| 497 return; | 503 return; |
| 498 } | 504 } |
| 499 } | 505 } |
| (...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1961 } | 1967 } |
| 1962 | 1968 |
| 1963 Send(new ViewHostMsg_ContextMenu(routing_id_, params)); | 1969 Send(new ViewHostMsg_ContextMenu(routing_id_, params)); |
| 1964 } | 1970 } |
| 1965 | 1971 |
| 1966 bool RenderView::supportsFullscreen() { | 1972 bool RenderView::supportsFullscreen() { |
| 1967 return CommandLine::ForCurrentProcess()->HasSwitch( | 1973 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 1968 switches::kEnableVideoFullscreen); | 1974 switches::kEnableVideoFullscreen); |
| 1969 } | 1975 } |
| 1970 | 1976 |
| 1971 void RenderView::enterFullscreenForNode(const WebKit::WebNode& node) { | |
| 1972 NOTIMPLEMENTED(); | |
| 1973 } | |
| 1974 | |
| 1975 void RenderView::exitFullscreenForNode(const WebKit::WebNode& node) { | |
| 1976 NOTIMPLEMENTED(); | |
| 1977 } | |
| 1978 | |
| 1979 void RenderView::setStatusText(const WebString& text) { | 1977 void RenderView::setStatusText(const WebString& text) { |
| 1980 } | 1978 } |
| 1981 | 1979 |
| 1982 void RenderView::UpdateTargetURL(const GURL& url, const GURL& fallback_url) { | 1980 void RenderView::UpdateTargetURL(const GURL& url, const GURL& fallback_url) { |
| 1983 GURL latest_url = url.is_empty() ? fallback_url : url; | 1981 GURL latest_url = url.is_empty() ? fallback_url : url; |
| 1984 if (latest_url == target_url_) | 1982 if (latest_url == target_url_) |
| 1985 return; | 1983 return; |
| 1986 | 1984 |
| 1987 // Tell the browser to display a destination link. | 1985 // Tell the browser to display a destination link. |
| 1988 if (target_url_status_ == TARGET_INFLIGHT || | 1986 if (target_url_status_ == TARGET_INFLIGHT || |
| (...skipping 3308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5297 // the origins of the two domains are different. This can be treated as a | 5295 // the origins of the two domains are different. This can be treated as a |
| 5298 // top level navigation and routed back to the host. | 5296 // top level navigation and routed back to the host. |
| 5299 WebKit::WebFrame* opener = frame->opener(); | 5297 WebKit::WebFrame* opener = frame->opener(); |
| 5300 if (opener) { | 5298 if (opener) { |
| 5301 if (url.GetOrigin() != GURL(opener->url()).GetOrigin()) | 5299 if (url.GetOrigin() != GURL(opener->url()).GetOrigin()) |
| 5302 return true; | 5300 return true; |
| 5303 } | 5301 } |
| 5304 } | 5302 } |
| 5305 return false; | 5303 return false; |
| 5306 } | 5304 } |
| OLD | NEW |