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

Side by Side Diff: chrome/browser/automation/automation_event_queue.cc

Issue 106433007: Update some uses of Value in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 12 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) 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "chrome/browser/automation/automation_event_observers.h" 9 #include "chrome/browser/automation/automation_event_observers.h"
10 #include "chrome/browser/automation/automation_event_queue.h" 10 #include "chrome/browser/automation/automation_event_queue.h"
11 #include "chrome/browser/automation/automation_provider_json.h" 11 #include "chrome/browser/automation/automation_provider_json.h"
12 #include "content/public/browser/notification_service.h" 12 #include "content/public/browser/notification_service.h"
13 #include "content/public/browser/notification_types.h" 13 #include "content/public/browser/notification_types.h"
14 14
15 AutomationEventQueue::CompareObserverId::CompareObserverId(int id) : id_(id) {} 15 AutomationEventQueue::CompareObserverId::CompareObserverId(int id) : id_(id) {}
16 16
17 bool AutomationEventQueue::CompareObserverId::operator()( 17 bool AutomationEventQueue::CompareObserverId::operator()(
18 AutomationEvent* event) const { 18 AutomationEvent* event) const {
19 return event->GetId() < 0 || event->GetId() == id_; 19 return event->GetId() < 0 || event->GetId() == id_;
20 } 20 }
21 21
22 AutomationEventQueue::AutomationEventQueue() 22 AutomationEventQueue::AutomationEventQueue()
23 : observer_id_count_(0), wait_observer_id_(-1) {} 23 : observer_id_count_(0), wait_observer_id_(-1) {}
24 24
25 AutomationEventQueue::~AutomationEventQueue() { 25 AutomationEventQueue::~AutomationEventQueue() {
26 Clear(); 26 Clear();
27 } 27 }
28 28
29 AutomationEventQueue::AutomationEvent::AutomationEvent( 29 AutomationEventQueue::AutomationEvent::AutomationEvent(
30 int observer_id, DictionaryValue* event_value) 30 int observer_id, base::DictionaryValue* event_value)
31 : observer_id_(observer_id), event_value_(event_value) {} 31 : observer_id_(observer_id), event_value_(event_value) {}
32 32
33 void AutomationEventQueue::GetNextEvent(AutomationJSONReply* reply, 33 void AutomationEventQueue::GetNextEvent(AutomationJSONReply* reply,
34 int observer_id, 34 int observer_id,
35 bool blocking) { 35 bool blocking) {
36 wait_automation_reply_.reset(reply); 36 wait_automation_reply_.reset(reply);
37 wait_observer_id_ = observer_id; 37 wait_observer_id_ = observer_id;
38 if (!CheckReturnEvent() && !blocking && wait_automation_reply_.get()) { 38 if (!CheckReturnEvent() && !blocking && wait_automation_reply_.get()) {
39 wait_automation_reply_->SendSuccess(NULL); 39 wait_automation_reply_->SendSuccess(NULL);
40 wait_automation_reply_.reset(); 40 wait_automation_reply_.reset();
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if (event) { 113 if (event) {
114 wait_automation_reply_->SendSuccess(event->GetValue()); 114 wait_automation_reply_->SendSuccess(event->GetValue());
115 wait_automation_reply_.reset(); 115 wait_automation_reply_.reset();
116 wait_observer_id_ = -1; 116 wait_observer_id_ = -1;
117 delete event; 117 delete event;
118 return true; 118 return true;
119 } 119 }
120 } 120 }
121 return false; 121 return false;
122 } 122 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_event_queue.h ('k') | chrome/browser/automation/automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698