Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 982413002: base: Stop passing a non-const ref to ObserverListBase::Iterator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: observerref: fixwindowsbuild Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | ipc/ipc_test_sink.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | ipc/ipc_test_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698