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

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

Issue 366025: Modifying extension automation so that it is done through a particular... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 "base/keyboard_codes.h" 7 #include "base/keyboard_codes.h"
8 #include "chrome/browser/automation/ui_controls.h" 8 #include "chrome/browser/automation/ui_controls.h"
9 #include "chrome/browser/browser_window.h" 9 #include "chrome/browser/browser_window.h"
10 #include "chrome/browser/external_tab_container.h" 10 #include "chrome/browser/external_tab_container.h"
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 483
484 void AutomationProvider::TerminateSession(int handle, bool* success) { 484 void AutomationProvider::TerminateSession(int handle, bool* success) {
485 *success = false; 485 *success = false;
486 486
487 if (browser_tracker_->ContainsHandle(handle)) { 487 if (browser_tracker_->ContainsHandle(handle)) {
488 Browser* browser = browser_tracker_->GetResource(handle); 488 Browser* browser = browser_tracker_->GetResource(handle);
489 HWND window = browser->window()->GetNativeHandle(); 489 HWND window = browser->window()->GetNativeHandle();
490 *success = (::PostMessageW(window, WM_ENDSESSION, 0, 0) == TRUE); 490 *success = (::PostMessageW(window, WM_ENDSESSION, 0, 0) == TRUE);
491 } 491 }
492 } 492 }
493
494 void AutomationProvider::SetEnableExtensionAutomation(
495 int tab_handle,
496 const std::vector<std::string>& functions_enabled) {
497 ExternalTabContainer* external_tab = GetExternalTabForHandle(tab_handle);
498 if (external_tab) {
499 external_tab->SetEnableExtensionAutomation(functions_enabled);
500 } else {
501 // Tab must exist, and must be an external tab so that its
502 // delegate has an on-empty
503 // implementation of ForwardMessageToExternalHost.
504 DLOG(WARNING) <<
505 "SetEnableExtensionAutomation called with invalid tab handle.";
506 }
507 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/extensions/extension_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698