| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 using WebKit::WebExternalPopupMenu; | 176 using WebKit::WebExternalPopupMenu; |
| 177 using WebKit::WebExternalPopupMenuClient; | 177 using WebKit::WebExternalPopupMenuClient; |
| 178 using WebKit::WebFileChooserCompletion; | 178 using WebKit::WebFileChooserCompletion; |
| 179 using WebKit::WebFileSystem; | 179 using WebKit::WebFileSystem; |
| 180 using WebKit::WebFileSystemCallbacks; | 180 using WebKit::WebFileSystemCallbacks; |
| 181 using WebKit::WebFindOptions; | 181 using WebKit::WebFindOptions; |
| 182 using WebKit::WebFormControlElement; | 182 using WebKit::WebFormControlElement; |
| 183 using WebKit::WebFormElement; | 183 using WebKit::WebFormElement; |
| 184 using WebKit::WebFrame; | 184 using WebKit::WebFrame; |
| 185 using WebKit::WebHistoryItem; | 185 using WebKit::WebHistoryItem; |
| 186 using WebKit::WebIconURL; |
| 186 using WebKit::WebImage; | 187 using WebKit::WebImage; |
| 187 using WebKit::WebInputElement; | 188 using WebKit::WebInputElement; |
| 188 using WebKit::WebMediaPlayer; | 189 using WebKit::WebMediaPlayer; |
| 189 using WebKit::WebMediaPlayerAction; | 190 using WebKit::WebMediaPlayerAction; |
| 190 using WebKit::WebMediaPlayerClient; | 191 using WebKit::WebMediaPlayerClient; |
| 191 using WebKit::WebNavigationPolicy; | 192 using WebKit::WebNavigationPolicy; |
| 192 using WebKit::WebNavigationType; | 193 using WebKit::WebNavigationType; |
| 193 using WebKit::WebNetworkStateNotifier; | 194 using WebKit::WebNetworkStateNotifier; |
| 194 using WebKit::WebNode; | 195 using WebKit::WebNode; |
| 195 using WebKit::WebPlugin; | 196 using WebKit::WebPlugin; |
| (...skipping 2267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2463 void RenderView::didReceiveTitle(WebFrame* frame, const WebString& title, | 2464 void RenderView::didReceiveTitle(WebFrame* frame, const WebString& title, |
| 2464 WebTextDirection direction) { | 2465 WebTextDirection direction) { |
| 2465 // TODO: pass direction through various APIs. | 2466 // TODO: pass direction through various APIs. |
| 2466 // http://code.google.com/p/chromium/issues/detail?id=79903 | 2467 // http://code.google.com/p/chromium/issues/detail?id=79903 |
| 2467 UpdateTitle(frame, title); | 2468 UpdateTitle(frame, title); |
| 2468 | 2469 |
| 2469 // Also check whether we have new encoding name. | 2470 // Also check whether we have new encoding name. |
| 2470 UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); | 2471 UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); |
| 2471 } | 2472 } |
| 2472 | 2473 |
| 2473 void RenderView::didChangeIcons(WebFrame* frame) { | 2474 void RenderView::didChangeIcon(WebFrame* frame, WebIconURL::Type type) { |
| 2474 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidChangeIcons(frame)); | 2475 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
| 2476 DidChangeIcon(frame, type)); |
| 2475 } | 2477 } |
| 2476 | 2478 |
| 2477 void RenderView::didFinishDocumentLoad(WebFrame* frame) { | 2479 void RenderView::didFinishDocumentLoad(WebFrame* frame) { |
| 2478 WebDataSource* ds = frame->dataSource(); | 2480 WebDataSource* ds = frame->dataSource(); |
| 2479 NavigationState* navigation_state = NavigationState::FromDataSource(ds); | 2481 NavigationState* navigation_state = NavigationState::FromDataSource(ds); |
| 2480 DCHECK(navigation_state); | 2482 DCHECK(navigation_state); |
| 2481 navigation_state->set_finish_document_load_time(Time::Now()); | 2483 navigation_state->set_finish_document_load_time(Time::Now()); |
| 2482 | 2484 |
| 2483 Send(new ViewHostMsg_DocumentLoadedInFrame(routing_id_, frame->identifier())); | 2485 Send(new ViewHostMsg_DocumentLoadedInFrame(routing_id_, frame->identifier())); |
| 2484 | 2486 |
| (...skipping 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4183 const webkit_glue::CustomContextMenuContext& custom_context) { | 4185 const webkit_glue::CustomContextMenuContext& custom_context) { |
| 4184 if (custom_context.is_pepper_menu) | 4186 if (custom_context.is_pepper_menu) |
| 4185 pepper_delegate_.OnContextMenuClosed(custom_context); | 4187 pepper_delegate_.OnContextMenuClosed(custom_context); |
| 4186 else | 4188 else |
| 4187 context_menu_node_.reset(); | 4189 context_menu_node_.reset(); |
| 4188 } | 4190 } |
| 4189 | 4191 |
| 4190 void RenderView::OnNetworkStateChanged(bool online) { | 4192 void RenderView::OnNetworkStateChanged(bool online) { |
| 4191 WebNetworkStateNotifier::setOnLine(online); | 4193 WebNetworkStateNotifier::setOnLine(online); |
| 4192 } | 4194 } |
| OLD | NEW |