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

Side by Side Diff: content/browser/renderer_host/render_widget_host.cc

Issue 6602049: Pure pedantry: Replace all ".size() == 0" with ".empty()". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
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/browser/renderer_host/render_widget_host.h" 5 #include "chrome/browser/renderer_host/render_widget_host.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 1232
1233 void RenderWidgetHost::AccessibilityDoDefaultAction(int acc_obj_id) { 1233 void RenderWidgetHost::AccessibilityDoDefaultAction(int acc_obj_id) {
1234 Send(new ViewMsg_AccessibilityDoDefaultAction(routing_id(), acc_obj_id)); 1234 Send(new ViewMsg_AccessibilityDoDefaultAction(routing_id(), acc_obj_id));
1235 } 1235 }
1236 1236
1237 void RenderWidgetHost::AccessibilityNotificationsAck() { 1237 void RenderWidgetHost::AccessibilityNotificationsAck() {
1238 Send(new ViewMsg_AccessibilityNotifications_ACK(routing_id())); 1238 Send(new ViewMsg_AccessibilityNotifications_ACK(routing_id()));
1239 } 1239 }
1240 1240
1241 void RenderWidgetHost::ProcessKeyboardEventAck(int type, bool processed) { 1241 void RenderWidgetHost::ProcessKeyboardEventAck(int type, bool processed) {
1242 if (key_queue_.size() == 0) { 1242 if (key_queue_.empty()) {
1243 LOG(ERROR) << "Got a KeyEvent back from the renderer but we " 1243 LOG(ERROR) << "Got a KeyEvent back from the renderer but we "
1244 << "don't seem to have sent it to the renderer!"; 1244 << "don't seem to have sent it to the renderer!";
1245 } else if (key_queue_.front().type != type) { 1245 } else if (key_queue_.front().type != type) {
1246 LOG(ERROR) << "We seem to have a different key type sent from " 1246 LOG(ERROR) << "We seem to have a different key type sent from "
1247 << "the renderer. (" << key_queue_.front().type << " vs. " 1247 << "the renderer. (" << key_queue_.front().type << " vs. "
1248 << type << "). Ignoring event."; 1248 << type << "). Ignoring event.";
1249 1249
1250 // Something must be wrong. Clear the |key_queue_| and 1250 // Something must be wrong. Clear the |key_queue_| and
1251 // |suppress_next_char_events_| so that we can resume from the error. 1251 // |suppress_next_char_events_| so that we can resume from the error.
1252 key_queue_.clear(); 1252 key_queue_.clear();
(...skipping 25 matching lines...) Expand all
1278 return; 1278 return;
1279 1279
1280 for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) { 1280 for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) {
1281 #if defined(TOOLKIT_USES_GTK) 1281 #if defined(TOOLKIT_USES_GTK)
1282 view_->CreatePluginContainer(deferred_plugin_handles_[i]); 1282 view_->CreatePluginContainer(deferred_plugin_handles_[i]);
1283 #endif 1283 #endif
1284 } 1284 }
1285 1285
1286 deferred_plugin_handles_.clear(); 1286 deferred_plugin_handles_.clear();
1287 } 1287 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698