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

Side by Side Diff: chrome/test/automation/automation_proxy.cc

Issue 20015: Make it easier to create new IPC channel types (i.e. renderer/plugin). Inste... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <sstream> 5 #include <sstream>
6 6
7 #include "chrome/test/automation/automation_proxy.h" 7 #include "chrome/test/automation/automation_proxy.h"
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
11 #include "chrome/common/ipc_message_macros.h"
12 #include "chrome/test/automation/automation_constants.h" 11 #include "chrome/test/automation/automation_constants.h"
13 #include "chrome/test/automation/automation_messages.h" 12 #include "chrome/test/automation/automation_messages.h"
14 #include "chrome/test/automation/browser_proxy.h" 13 #include "chrome/test/automation/browser_proxy.h"
15 #include "chrome/test/automation/tab_proxy.h" 14 #include "chrome/test/automation/tab_proxy.h"
16 #include "chrome/test/automation/window_proxy.h" 15 #include "chrome/test/automation/window_proxy.h"
17 #include "chrome/views/dialog_delegate.h" 16 #include "chrome/views/dialog_delegate.h"
18 17
19 using base::TimeDelta; 18 using base::TimeDelta;
20 using base::TimeTicks; 19 using base::TimeTicks;
21 20
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 IPC::Message* response = NULL; 546 IPC::Message* response = NULL;
548 bool succeeded = SendAndWaitForResponse( 547 bool succeeded = SendAndWaitForResponse(
549 new AutomationMsg_CreateExternalTab(0, parent, dimensions, style), 548 new AutomationMsg_CreateExternalTab(0, parent, dimensions, style),
550 &response, AutomationMsg_CreateExternalTabResponse::ID); 549 &response, AutomationMsg_CreateExternalTabResponse::ID);
551 if (!succeeded) { 550 if (!succeeded) {
552 return NULL; 551 return NULL;
553 } 552 }
554 void* iter = NULL; 553 void* iter = NULL;
555 int handle = 0; 554 int handle = 0;
556 TabProxy* tab_proxy = NULL; 555 TabProxy* tab_proxy = NULL;
557 if (IPC::ReadParam(response, &iter, external_tab_container) && 556 if (ReadParam(response, &iter, external_tab_container) &&
558 IsWindow(*external_tab_container)) { 557 IsWindow(*external_tab_container)) {
559 if (response->ReadInt(&iter, &handle) && 558 if (response->ReadInt(&iter, &handle) &&
560 (handle >= 0)) { 559 (handle >= 0)) {
561 succeeded = true; 560 succeeded = true;
562 tab_proxy = new TabProxy(this, tracker_.get(), handle); 561 tab_proxy = new TabProxy(this, tracker_.get(), handle);
563 } 562 }
564 } else { 563 } else {
565 succeeded = false; 564 succeeded = false;
566 } 565 }
567 delete response; 566 delete response;
568 return tab_proxy; 567 return tab_proxy;
569 } 568 }
OLDNEW
« no previous file with comments | « chrome/test/automation/automation_messages_internal.h ('k') | chrome/test/automation/tab_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698