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

Side by Side Diff: chrome/renderer/webworker_base.h

Issue 6609008: Change other usages of .size() to .empty() when applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter nits 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
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.cc ('k') | chrome/test/reliability/page_load_test.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #ifndef CHROME_RENDERER_WEBWORKER_BASE_H_ 5 #ifndef CHROME_RENDERER_WEBWORKER_BASE_H_
6 #define CHROME_RENDERER_WEBWORKER_BASE_H_ 6 #define CHROME_RENDERER_WEBWORKER_BASE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 bool IsStarted(); 46 bool IsStarted();
47 47
48 // Disconnects the worker (stops listening for incoming messages). 48 // Disconnects the worker (stops listening for incoming messages).
49 void Disconnect(); 49 void Disconnect();
50 50
51 // Sends a message to the worker thread (forwarded via the RenderViewHost). 51 // Sends a message to the worker thread (forwarded via the RenderViewHost).
52 // If WorkerStarted() has not yet been called, message is queued. 52 // If WorkerStarted() has not yet been called, message is queued.
53 bool Send(IPC::Message*); 53 bool Send(IPC::Message*);
54 54
55 // Returns true if there are queued messages. 55 // Returns true if there are queued messages.
56 bool HasQueuedMessages() { return queued_messages_.size() != 0; } 56 bool HasQueuedMessages() { return !queued_messages_.empty(); }
57 57
58 // Sends any messages currently in the queue. 58 // Sends any messages currently in the queue.
59 void SendQueuedMessages(); 59 void SendQueuedMessages();
60 60
61 protected: 61 protected:
62 WebWorkerBase(ChildThread* child_thread, 62 WebWorkerBase(ChildThread* child_thread,
63 unsigned long long document_id, 63 unsigned long long document_id,
64 int route_id, 64 int route_id,
65 int render_view_route_id, 65 int render_view_route_id,
66 int parent_appcache_host_id); 66 int parent_appcache_host_id);
(...skipping 23 matching lines...) Expand all
90 unsigned long long document_id_; 90 unsigned long long document_id_;
91 91
92 // ID of our parent's appcache host, only valid for dedicated workers. 92 // ID of our parent's appcache host, only valid for dedicated workers.
93 int parent_appcache_host_id_; 93 int parent_appcache_host_id_;
94 94
95 // Stores messages that were sent before the StartWorkerContext message. 95 // Stores messages that were sent before the StartWorkerContext message.
96 std::vector<IPC::Message*> queued_messages_; 96 std::vector<IPC::Message*> queued_messages_;
97 }; 97 };
98 98
99 #endif // CHROME_RENDERER_WEBWORKER_BASE_H_ 99 #endif // CHROME_RENDERER_WEBWORKER_BASE_H_
OLDNEW
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.cc ('k') | chrome/test/reliability/page_load_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698