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 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1265 | 1265 |
1266 bool RenderViewImpl::HasIMETextFocus() { | 1266 bool RenderViewImpl::HasIMETextFocus() { |
1267 return GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE; | 1267 return GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE; |
1268 } | 1268 } |
1269 | 1269 |
1270 bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { | 1270 bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { |
1271 WebFrame* main_frame = webview() ? webview()->mainFrame() : NULL; | 1271 WebFrame* main_frame = webview() ? webview()->mainFrame() : NULL; |
1272 if (main_frame && main_frame->isWebLocalFrame()) | 1272 if (main_frame && main_frame->isWebLocalFrame()) |
1273 GetContentClient()->SetActiveURL(main_frame->document().url()); | 1273 GetContentClient()->SetActiveURL(main_frame->document().url()); |
1274 | 1274 |
1275 ObserverListBase<RenderViewObserver>::Iterator it(&observers_); | 1275 base::ObserverListBase<RenderViewObserver>::Iterator it(&observers_); |
1276 RenderViewObserver* observer; | 1276 RenderViewObserver* observer; |
1277 while ((observer = it.GetNext()) != NULL) | 1277 while ((observer = it.GetNext()) != NULL) |
1278 if (observer->OnMessageReceived(message)) | 1278 if (observer->OnMessageReceived(message)) |
1279 return true; | 1279 return true; |
1280 | 1280 |
1281 bool handled = true; | 1281 bool handled = true; |
1282 IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message) | 1282 IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message) |
1283 IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand) | 1283 IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand) |
1284 IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret) | 1284 IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret) |
1285 IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect, | 1285 IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect, |
(...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3767 std::vector<gfx::Size> sizes; | 3767 std::vector<gfx::Size> sizes; |
3768 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 3768 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
3769 if (!url.isEmpty()) | 3769 if (!url.isEmpty()) |
3770 urls.push_back( | 3770 urls.push_back( |
3771 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 3771 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
3772 } | 3772 } |
3773 SendUpdateFaviconURL(urls); | 3773 SendUpdateFaviconURL(urls); |
3774 } | 3774 } |
3775 | 3775 |
3776 } // namespace content | 3776 } // namespace content |
OLD | NEW |