| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1262 | 1262 |
| 1263 bool RenderViewImpl::HasIMETextFocus() { | 1263 bool RenderViewImpl::HasIMETextFocus() { |
| 1264 return GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE; | 1264 return GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE; |
| 1265 } | 1265 } |
| 1266 | 1266 |
| 1267 bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { | 1267 bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { |
| 1268 WebFrame* main_frame = webview() ? webview()->mainFrame() : NULL; | 1268 WebFrame* main_frame = webview() ? webview()->mainFrame() : NULL; |
| 1269 if (main_frame && main_frame->isWebLocalFrame()) | 1269 if (main_frame && main_frame->isWebLocalFrame()) |
| 1270 GetContentClient()->SetActiveURL(main_frame->document().url()); | 1270 GetContentClient()->SetActiveURL(main_frame->document().url()); |
| 1271 | 1271 |
| 1272 ObserverListBase<RenderViewObserver>::Iterator it(observers_); | 1272 ObserverListBase<RenderViewObserver>::Iterator it(&observers_); |
| 1273 RenderViewObserver* observer; | 1273 RenderViewObserver* observer; |
| 1274 while ((observer = it.GetNext()) != NULL) | 1274 while ((observer = it.GetNext()) != NULL) |
| 1275 if (observer->OnMessageReceived(message)) | 1275 if (observer->OnMessageReceived(message)) |
| 1276 return true; | 1276 return true; |
| 1277 | 1277 |
| 1278 bool handled = true; | 1278 bool handled = true; |
| 1279 IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message) | 1279 IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message) |
| 1280 IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand) | 1280 IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand) |
| 1281 IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret) | 1281 IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret) |
| 1282 IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect, | 1282 IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect, |
| (...skipping 2716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3999 std::vector<gfx::Size> sizes; | 3999 std::vector<gfx::Size> sizes; |
| 4000 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4000 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 4001 if (!url.isEmpty()) | 4001 if (!url.isEmpty()) |
| 4002 urls.push_back( | 4002 urls.push_back( |
| 4003 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4003 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 4004 } | 4004 } |
| 4005 SendUpdateFaviconURL(urls); | 4005 SendUpdateFaviconURL(urls); |
| 4006 } | 4006 } |
| 4007 | 4007 |
| 4008 } // namespace content | 4008 } // namespace content |
| OLD | NEW |