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

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

Issue 200003: Chrome side of the fix for http://b/issue?id=1694574, which is a bug caused w... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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) 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 #include "chrome/browser/automation/automation_provider.h" 5 #include "chrome/browser/automation/automation_provider.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/message_box_flags.h" 10 #include "app/message_box_flags.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 WaitForBrowserWindowCountToBecome) 418 WaitForBrowserWindowCountToBecome)
419 IPC_MESSAGE_HANDLER_DELAY_REPLY( 419 IPC_MESSAGE_HANDLER_DELAY_REPLY(
420 AutomationMsg_WaitForAppModalDialogToBeShown, 420 AutomationMsg_WaitForAppModalDialogToBeShown,
421 WaitForAppModalDialogToBeShown) 421 WaitForAppModalDialogToBeShown)
422 IPC_MESSAGE_HANDLER_DELAY_REPLY( 422 IPC_MESSAGE_HANDLER_DELAY_REPLY(
423 AutomationMsg_GoBackBlockUntilNavigationsComplete, 423 AutomationMsg_GoBackBlockUntilNavigationsComplete,
424 GoBackBlockUntilNavigationsComplete) 424 GoBackBlockUntilNavigationsComplete)
425 IPC_MESSAGE_HANDLER_DELAY_REPLY( 425 IPC_MESSAGE_HANDLER_DELAY_REPLY(
426 AutomationMsg_GoForwardBlockUntilNavigationsComplete, 426 AutomationMsg_GoForwardBlockUntilNavigationsComplete,
427 GoForwardBlockUntilNavigationsComplete) 427 GoForwardBlockUntilNavigationsComplete)
428 #if defined(OS_WIN)
429 IPC_MESSAGE_HANDLER(AutomationMsg_ConnectExternalTab, ConnectExternalTab)
430 #endif
428 IPC_END_MESSAGE_MAP() 431 IPC_END_MESSAGE_MAP()
429 } 432 }
430 433
431 void AutomationProvider::ActivateTab(int handle, int at_index, int* status) { 434 void AutomationProvider::ActivateTab(int handle, int at_index, int* status) {
432 *status = -1; 435 *status = -1;
433 if (browser_tracker_->ContainsHandle(handle) && at_index > -1) { 436 if (browser_tracker_->ContainsHandle(handle) && at_index > -1) {
434 Browser* browser = browser_tracker_->GetResource(handle); 437 Browser* browser = browser_tracker_->GetResource(handle);
435 if (at_index >= 0 && at_index < browser->tab_count()) { 438 if (at_index >= 0 && at_index < browser->tab_count()) {
436 browser->SelectTabContentsAt(at_index, true); 439 browser->SelectTabContentsAt(at_index, true);
437 *status = 0; 440 *status = 0;
(...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 for (;iter != BrowserList::end(); ++iter) { 2061 for (;iter != BrowserList::end(); ++iter) {
2059 gfx::NativeWindow this_window = (*iter)->window()->GetNativeHandle(); 2062 gfx::NativeWindow this_window = (*iter)->window()->GetNativeHandle();
2060 if (window == this_window) { 2063 if (window == this_window) {
2061 // Add() returns the existing handle for the resource if any. 2064 // Add() returns the existing handle for the resource if any.
2062 *browser_handle = browser_tracker_->Add(*iter); 2065 *browser_handle = browser_tracker_->Add(*iter);
2063 *success = true; 2066 *success = true;
2064 return; 2067 return;
2065 } 2068 }
2066 } 2069 }
2067 } 2070 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider.h ('k') | chrome/browser/automation/automation_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698