diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 17:05:11 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 17:05:11 +0000 |
commit | 9c9c761a2e070a8a6eb00f22a4365fc6cc2e1eff (patch) | |
tree | 11e6d28d263457e00395401c938ff5fb45d6eba6 /chrome/browser/automation | |
parent | 6920f5ac0d0ea336b79f02b5d36751d1043ace29 (diff) | |
download | chromium_src-9c9c761a2e070a8a6eb00f22a4365fc6cc2e1eff.zip chromium_src-9c9c761a2e070a8a6eb00f22a4365fc6cc2e1eff.tar.gz chromium_src-9c9c761a2e070a8a6eb00f22a4365fc6cc2e1eff.tar.bz2 |
Removes entirely dead code paths related to ConstrainedWindows.
- Removes parts of the interface that probably made sense at some time, but now only have a DLOG(INFO) as their implementation. Also remove their callers.
- Remove all usage of the ConstrainedWindowProxy interface in the automation system. It was *never* used.
- Rename constrianed_window_impl_interactive_uitests.cc to blocked_popup_container_interactive_uitest.cc. The test case hasn't tested code in constrained_window_impl.cc since the rewrite of the blocked popup system back last autumn.
Review URL: http://codereview.chromium.org/125160
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18498 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r-- | chrome/browser/automation/automation_constrained_window_tracker.h | 31 | ||||
-rwxr-xr-x | chrome/browser/automation/automation_provider.cc | 62 | ||||
-rw-r--r-- | chrome/browser/automation/automation_provider.h | 16 |
3 files changed, 0 insertions, 109 deletions
diff --git a/chrome/browser/automation/automation_constrained_window_tracker.h b/chrome/browser/automation/automation_constrained_window_tracker.h deleted file mode 100644 index fe4261a..0000000 --- a/chrome/browser/automation/automation_constrained_window_tracker.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_CONSTRAINED_WINDOW_TRACKER_H__ -#define CHROME_BROWSER_AUTOMATION_AUTOMATION_CONSTRAINED_WINDOW_TRACKER_H__ - -#include "chrome/browser/automation/automation_resource_tracker.h" -#include "chrome/browser/tab_contents/constrained_window.h" - -class AutomationConstrainedWindowTracker - : public AutomationResourceTracker<ConstrainedWindow*> { -public: - AutomationConstrainedWindowTracker(IPC::Message::Sender* automation) - : AutomationResourceTracker(automation) {} - - virtual ~AutomationConstrainedWindowTracker() { - } - - virtual void AddObserver(ConstrainedWindow* resource) { - registrar_.Add(this, NotificationType::CWINDOW_CLOSED, - Source<ConstrainedWindow>(resource)); - } - - virtual void RemoveObserver(ConstrainedWindow* resource) { - registrar_.Remove(this, NotificationType::CWINDOW_CLOSED, - Source<ConstrainedWindow>(resource)); - } -}; - -#endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_CONSTRAINED_WINDOW_TRACKER_H__ diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 859beaf..9445b92 100755 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -805,12 +805,6 @@ AutomationProvider::AutomationProvider(Profile* profile) window_tracker_.reset(new AutomationWindowTracker(this)); autocomplete_edit_tracker_.reset( new AutomationAutocompleteEditTracker(this)); -#if defined(OS_WIN) - // TODO(port): Enable as the trackers get ported. - cwindow_tracker_.reset(new AutomationConstrainedWindowTracker(this)); -#else - NOTIMPLEMENTED() << "hook up constrained window tracker"; -#endif new_tab_ui_load_observer_.reset(new NewTabUILoadObserver(this)); dom_operation_observer_.reset(new DomOperationNotificationObserver(this)); dom_inspector_observer_.reset(new DomInspectorNotificationObserver(this)); @@ -996,8 +990,6 @@ void AutomationProvider::OnMessageReceived(const IPC::Message& message) { ExecuteJavascript) IPC_MESSAGE_HANDLER(AutomationMsg_ConstrainedWindowCount, GetConstrainedWindowCount) - IPC_MESSAGE_HANDLER(AutomationMsg_ConstrainedWindow, GetConstrainedWindow) - IPC_MESSAGE_HANDLER(AutomationMsg_ConstrainedTitle, GetConstrainedTitle) IPC_MESSAGE_HANDLER(AutomationMsg_FindInPage, HandleFindInPageRequest) IPC_MESSAGE_HANDLER(AutomationMsg_GetFocusedViewID, GetFocusedViewID) IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_InspectElement, @@ -1051,8 +1043,6 @@ void AutomationProvider::OnMessageReceived(const IPC::Message& message) { AutocompleteEditIsQueryInProgress) IPC_MESSAGE_HANDLER(AutomationMsg_AutocompleteEditGetMatches, AutocompleteEditGetMatches) - IPC_MESSAGE_HANDLER(AutomationMsg_ConstrainedWindowBounds, - GetConstrainedWindowBounds) IPC_MESSAGE_HANDLER(AutomationMsg_OpenFindInPage, HandleOpenFindInPageRequest) IPC_MESSAGE_HANDLER(AutomationMsg_HandleMessageFromExternalHost, @@ -2002,58 +1992,6 @@ void AutomationProvider::GetConstrainedWindowCount(int handle, int* count) { } } -void AutomationProvider::GetConstrainedWindow(int handle, int index, - int* cwindow_handle) { - *cwindow_handle = 0; - if (tab_tracker_->ContainsHandle(handle) && index >= 0) { - NavigationController* nav_controller = - tab_tracker_->GetResource(handle); - TabContents* tab = nav_controller->tab_contents(); - if (tab && index < static_cast<int>(tab->child_windows_.size())) { -#if defined(OS_WIN) - ConstrainedWindow* window = tab->child_windows_[index]; - *cwindow_handle = cwindow_tracker_->Add(window); -#else - // TODO(port): Enable when cwindow_tracker is ported. - NOTIMPLEMENTED(); -#endif - } - } -} - -void AutomationProvider::GetConstrainedTitle(int handle, - int* title_string_size, - std::wstring* title) { - *title_string_size = -1; // -1 is the error code -#if defined(OS_WIN) - if (cwindow_tracker_->ContainsHandle(handle)) { - ConstrainedWindow* window = cwindow_tracker_->GetResource(handle); - *title = window->GetWindowTitle(); - *title_string_size = static_cast<int>(title->size()); - } -#else - // TODO(port): Enable when cwindow_tracker is ported. - NOTIMPLEMENTED(); -#endif -} - -void AutomationProvider::GetConstrainedWindowBounds(int handle, bool* exists, - gfx::Rect* rect) { - *rect = gfx::Rect(0, 0, 0, 0); -#if defined(OS_WIN) - if (cwindow_tracker_->ContainsHandle(handle)) { - ConstrainedWindow* window = cwindow_tracker_->GetResource(handle); - if (window) { - *exists = true; - *rect = window->GetCurrentBounds(); - } - } -#else - // TODO(port): Enable when cwindow_tracker is ported. - NOTIMPLEMENTED(); -#endif -} - void AutomationProvider::HandleFindInPageRequest( int handle, const std::wstring& find_request, int forward, int match_case, int* active_ordinal, int* matches_found) { diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index 389543a..ccf580d 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -32,11 +32,6 @@ #include "views/event.h" #endif // defined(OS_WIN) -#if defined(OS_WIN) -// TODO(port): enable these. -#include "chrome/browser/automation/automation_constrained_window_tracker.h" -#endif - struct AutomationMsg_Find_Params; namespace IPC { @@ -239,13 +234,6 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>, void ApplyAccelerator(int handle, int id); void GetConstrainedWindowCount(int handle, int* count); - void GetConstrainedWindow(int handle, int index, int* cwindow_handle); - - void GetConstrainedTitle(int handle, int* title, - std::wstring* title_string_size); - - void GetConstrainedWindowBounds(int handle, bool* exists, - gfx::Rect* rect); // This function has been deprecated, please use HandleFindRequest. void HandleFindInPageRequest(int handle, @@ -487,10 +475,6 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>, scoped_ptr<AutomationBrowserTracker> browser_tracker_; scoped_ptr<AutomationTabTracker> tab_tracker_; scoped_ptr<AutomationWindowTracker> window_tracker_; -#if defined(OS_WIN) - // TODO(port): Enable as trackers get ported. - scoped_ptr<AutomationConstrainedWindowTracker> cwindow_tracker_; -#endif scoped_ptr<AutomationAutocompleteEditTracker> autocomplete_edit_tracker_; scoped_ptr<NavigationControllerRestoredObserver> restore_tracker_; LoginHandlerMap login_handler_map_; |