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

Unified Diff: chrome/browser/automation/automation_util.cc

Issue 10536058: TabContentsWrapper -> TabContents, part 6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: GetOwningTabContentsForWebContents Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/automation/automation_util.cc
diff --git a/chrome/browser/automation/automation_util.cc b/chrome/browser/automation/automation_util.cc
index 87542458920314d65ba357b82c2d352dad64504f..d5d570c47dd4c2e122003f09c6616f8f03af4795 100644
--- a/chrome/browser/automation/automation_util.cc
+++ b/chrome/browser/automation/automation_util.cc
@@ -24,7 +24,7 @@
#include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/view_type_utils.h"
#include "chrome/common/automation_id.h"
#include "chrome/common/extensions/extension.h"
@@ -406,7 +406,7 @@ bool SendErrorIfModalDialogActive(AutomationProvider* provider,
return active;
}
-AutomationId GetIdForTab(const TabContentsWrapper* tab) {
+AutomationId GetIdForTab(const TabContents* tab) {
return AutomationId(
AutomationId::kTypeTab,
base::IntToString(tab->restore_tab_helper()->session_id().id()));
@@ -452,20 +452,21 @@ bool GetTabForId(const AutomationId& id, WebContents** tab) {
for (; iter != BrowserList::end(); ++iter) {
Browser* browser = *iter;
for (int tab_index = 0; tab_index < browser->tab_count(); ++tab_index) {
- TabContentsWrapper* wrapper = browser->GetTabContentsWrapperAt(tab_index);
- if (base::IntToString(wrapper->restore_tab_helper()->session_id().id()) ==
- id.id()) {
- *tab = wrapper->web_contents();
+ TabContents* tab_contents = browser->GetTabContentsAt(tab_index);
+ if (base::IntToString(
+ tab_contents->restore_tab_helper()->session_id().id()) ==
+ id.id()) {
+ *tab = tab_contents->web_contents();
return true;
}
if (preview_controller) {
- TabContentsWrapper* preview_wrapper =
- preview_controller->GetPrintPreviewForTab(wrapper);
- if (preview_wrapper) {
+ TabContents* preview_tab_contents =
+ preview_controller->GetPrintPreviewForTab(tab_contents);
+ if (preview_tab_contents) {
std::string preview_id = base::IntToString(
- preview_wrapper->restore_tab_helper()->session_id().id());
+ preview_tab_contents->restore_tab_helper()->session_id().id());
if (preview_id == id.id()) {
- *tab = preview_wrapper->web_contents();
+ *tab = preview_tab_contents->web_contents();
return true;
}
}

Powered by Google App Engine
This is Rietveld 408576698