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

Unified Diff: chrome/browser/extensions/api/web_navigation/web_navigation_api.cc

Issue 10535077: TabContentsWrapper -> TabContents, part 12. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/extensions/api/web_navigation/web_navigation_api.cc
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
index a637e340b922dabbfed48b1d0a5cb392010aae00..998130d3b12946252f90cc3e19528f061caee0df 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tab_contents/retargeting_details.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/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
@@ -458,11 +458,10 @@ void WebNavigationEventRouter::Retargeting(const RetargetingDetails* details) {
return;
// If the WebContents was created as a response to an IPC from a renderer
- // (and therefore doesn't yet have a wrapper), or if it isn't yet inserted
+ // (and therefore doesn't yet have a TabContents), or if it isn't yet inserted
// into a tab strip, we need to delay the extension event until the
// WebContents is fully initialized.
- if ((TabContentsWrapper::GetCurrentWrapperForContents(
- details->target_web_contents) == NULL) ||
+ if (TabContents::FromWebContents(details->target_web_contents) == NULL ||
details->not_yet_in_tabstrip) {
pending_web_contents_[details->target_web_contents] =
PendingWebContents(
@@ -731,14 +730,18 @@ bool GetFrameFunction::RunImpl() {
result_.reset(Value::CreateNullValue());
- TabContentsWrapper* wrapper;
- if (!ExtensionTabUtil::GetTabById(
- tab_id, profile(), include_incognito(), NULL, NULL, &wrapper, NULL) ||
- !wrapper) {
+ TabContents* tab_contents;
+ if (!ExtensionTabUtil::GetTabById(tab_id,
+ profile(),
+ include_incognito(),
+ NULL, NULL,
+ &tab_contents,
+ NULL) ||
+ !tab_contents) {
return true;
}
- WebContents* web_contents = wrapper->web_contents();
+ WebContents* web_contents = tab_contents->web_contents();
WebNavigationTabObserver* observer =
WebNavigationTabObserver::Get(web_contents);
DCHECK(observer);
@@ -774,14 +777,18 @@ bool GetAllFramesFunction::RunImpl() {
result_.reset(Value::CreateNullValue());
- TabContentsWrapper* wrapper;
- if (!ExtensionTabUtil::GetTabById(
- tab_id, profile(), include_incognito(), NULL, NULL, &wrapper, NULL) ||
- !wrapper) {
+ TabContents* tab_contents;
+ if (!ExtensionTabUtil::GetTabById(tab_id,
+ profile(),
+ include_incognito(),
+ NULL, NULL,
+ &tab_contents,
+ NULL) ||
+ !tab_contents) {
return true;
}
- WebContents* web_contents = wrapper->web_contents();
+ WebContents* web_contents = tab_contents->web_contents();
WebNavigationTabObserver* observer =
WebNavigationTabObserver::Get(web_contents);
DCHECK(observer);
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs.cc ('k') | chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698