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

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

Issue 7055004: File upload API in chromedriver (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed a compile error. Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/automation/automation_provider_observers.h" 5 #include "chrome/browser/automation/automation_provider_observers.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 2537 matching lines...) Expand 10 before | Expand all | Expand 10 after
2548 this, 2548 this,
2549 &WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread)); 2549 &WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread));
2550 } 2550 }
2551 2551
2552 void WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread() { 2552 void WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread() {
2553 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 2553 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
2554 if (automation_) 2554 if (automation_)
2555 automation_->Send(reply_message_.release()); 2555 automation_->Send(reply_message_.release());
2556 Release(); 2556 Release();
2557 } 2557 }
2558
2559 DragTargetDropAckNotificationObserver::DragTargetDropAckNotificationObserver(
2560 AutomationProvider* automation,
2561 IPC::Message* reply_message)
2562 : automation_(automation->AsWeakPtr()),
2563 reply_message_(reply_message) {
2564 registrar_.Add(
2565 this,
2566 NotificationType::RENDER_VIEW_HOST_DID_RECEIVE_DRAG_TARGET_DROP_ACK,
2567 NotificationService::AllSources());
2568 }
2569
2570 DragTargetDropAckNotificationObserver::
2571 ~DragTargetDropAckNotificationObserver() {}
2572
2573 void DragTargetDropAckNotificationObserver::Observe(
2574 NotificationType type,
2575 const NotificationSource& source,
2576 const NotificationDetails& details) {
2577 if (automation_) {
2578 AutomationJSONReply(automation_,
2579 reply_message_.release()).SendSuccess(NULL);
2580 }
2581 delete this;
2582 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698