summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc3
-rw-r--r--chrome/browser/extensions/api/bookmarks/bookmarks_api.cc3
-rw-r--r--chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc5
-rw-r--r--chrome/browser/extensions/api/developer_private/entry_picker.cc3
-rw-r--r--chrome/browser/extensions/api/downloads/downloads_api.cc6
-rw-r--r--chrome/browser/extensions/api/file_system/file_system_api.cc3
-rw-r--r--chrome/browser/extensions/api/media_galleries/media_galleries_api.cc3
-rw-r--r--chrome/browser/extensions/api/messaging/incognito_connectability.cc4
-rw-r--r--chrome/browser/extensions/api/sessions/sessions_api.cc2
-rw-r--r--chrome/browser/extensions/api/sessions/sessions_api.h2
-rw-r--r--chrome/browser/extensions/api/streams_private/streams_private_api.cc2
-rw-r--r--chrome/browser/extensions/api/streams_private/streams_private_api.h2
-rw-r--r--chrome/browser/extensions/api/tabs/tabs_api.cc3
-rw-r--r--chrome/browser/extensions/api/tabs/tabs_event_router.cc7
-rw-r--r--chrome/browser/extensions/api/tabs/tabs_event_router.h2
-rw-r--r--chrome/browser/extensions/extension_install_prompt.cc3
-rw-r--r--chrome/browser/extensions/extension_tab_util.cc21
-rw-r--r--chrome/browser/extensions/extension_tab_util.h12
-rw-r--r--chrome/browser/extensions/extension_tab_util_android.cc6
-rw-r--r--chrome/browser/extensions/extension_view_host.cc7
-rw-r--r--chrome/browser/extensions/tab_helper.cc3
21 files changed, 42 insertions, 60 deletions
diff --git a/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc b/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc
index a090c2d..fd57543 100644
--- a/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc
+++ b/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc
@@ -30,7 +30,6 @@
#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "extensions/browser/extension_function_dispatcher.h"
#include "extensions/browser/view_type_utils.h"
@@ -544,7 +543,7 @@ bool BookmarkManagerPrivateStartDragFunction::RunOnReady() {
source = ui::DragDropTypes::DRAG_EVENT_SOURCE_TOUCH;
chrome::DragBookmarks(
- GetProfile(), nodes, web_contents->GetView()->GetNativeView(), source);
+ GetProfile(), nodes, web_contents->GetNativeView(), source);
return true;
} else {
diff --git a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
index a8587a0..2a736b0 100644
--- a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
+++ b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
@@ -41,7 +41,6 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_function_dispatcher.h"
#include "extensions/browser/quota_service.h"
@@ -955,7 +954,7 @@ void BookmarksIOFunction::ShowSelectFileDialog(
file_type_info.extensions.resize(1);
file_type_info.extensions[0].push_back(FILE_PATH_LITERAL("html"));
gfx::NativeWindow owning_window = web_contents ?
- platform_util::GetTopLevel(web_contents->GetView()->GetNativeView())
+ platform_util::GetTopLevel(web_contents->GetNativeView())
: NULL;
#if defined(OS_WIN)
if (!owning_window &&
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc
index a6ff794..8398736 100644
--- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc
+++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc
@@ -18,7 +18,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "net/base/net_util.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "third_party/webrtc/modules/desktop_capture/screen_capturer.h"
@@ -131,13 +130,13 @@ bool DesktopCaptureChooseDesktopMediaFunction::RunAsync() {
Observe(web_contents);
render_view = web_contents->GetRenderViewHost();
- parent_window = web_contents->GetView()->GetTopLevelNativeWindow();
+ parent_window = web_contents->GetTopLevelNativeWindow();
} else {
origin_ = GetExtension()->url();
target_name = base::UTF8ToUTF16(GetExtension()->name());
render_view = render_view_host();
parent_window =
- GetAssociatedWebContents()->GetView()->GetTopLevelNativeWindow();
+ GetAssociatedWebContents()->GetTopLevelNativeWindow();
}
render_process_id_ = render_view->GetProcess()->GetID();
render_view_id_ = render_view->GetRoutingID();
diff --git a/chrome/browser/extensions/api/developer_private/entry_picker.cc b/chrome/browser/extensions/api/developer_private/entry_picker.cc
index f21371c..9e3b6af 100644
--- a/chrome/browser/extensions/api/developer_private/entry_picker.cc
+++ b/chrome/browser/extensions/api/developer_private/entry_picker.cc
@@ -11,7 +11,6 @@
#include "chrome/browser/platform_util.h"
#include "chrome/browser/ui/chrome_select_file_policy.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "ui/shell_dialogs/select_file_dialog.h"
namespace {
@@ -37,7 +36,7 @@ EntryPicker::EntryPicker(EntryPickerClient* client,
this, new ChromeSelectFilePolicy(web_contents));
gfx::NativeWindow owning_window = web_contents ?
- platform_util::GetTopLevel(web_contents->GetView()->GetNativeView()) :
+ platform_util::GetTopLevel(web_contents->GetNativeView()) :
NULL;
if (g_skip_picker_for_test) {
diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc
index c51e4fb..46f1d4e 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api.cc
@@ -61,7 +61,6 @@
#include "content/public/browser/resource_context.h"
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_function_dispatcher.h"
#include "extensions/browser/extension_registry.h"
@@ -1292,8 +1291,7 @@ void DownloadsAcceptDangerFunction::PromptOrWait(int download_id, int retries) {
SendResponse(error_.empty());
return;
}
- bool visible = platform_util::IsVisible(
- web_contents->GetView()->GetNativeView());
+ bool visible = platform_util::IsVisible(web_contents->GetNativeView());
if (!visible) {
if (retries > 0) {
base::MessageLoopForUI::current()->PostDelayedTask(
@@ -1417,7 +1415,7 @@ bool DownloadsDragFunction::RunAsync() {
RecordApiFunctions(DOWNLOADS_FUNCTION_DRAG);
gfx::Image* icon = g_browser_process->icon_manager()->LookupIconFromFilepath(
download_item->GetTargetFilePath(), IconLoader::NORMAL);
- gfx::NativeView view = web_contents->GetView()->GetNativeView();
+ gfx::NativeView view = web_contents->GetNativeView();
{
// Enable nested tasks during DnD, while |DragDownload()| blocks.
base::MessageLoop::ScopedNestableTaskAllower allow(
diff --git a/chrome/browser/extensions/api/file_system/file_system_api.cc b/chrome/browser/extensions/api/file_system/file_system_api.cc
index 56895d7..fee90cb 100644
--- a/chrome/browser/extensions/api/file_system/file_system_api.cc
+++ b/chrome/browser/extensions/api/file_system/file_system_api.cc
@@ -32,7 +32,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/permissions/api_permission.h"
#include "grit/generated_resources.h"
@@ -438,7 +437,7 @@ class FileSystemChooseEntryFunction::FilePicker
select_file_dialog_ = ui::SelectFileDialog::Create(
this, new ChromeSelectFilePolicy(web_contents));
gfx::NativeWindow owning_window = web_contents ?
- platform_util::GetTopLevel(web_contents->GetView()->GetNativeView()) :
+ platform_util::GetTopLevel(web_contents->GetNativeView()) :
NULL;
if (g_skip_picker_for_test) {
diff --git a/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc b/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
index 3e7aa8d..024efde 100644
--- a/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
+++ b/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
@@ -42,7 +42,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_system.h"
@@ -228,7 +227,7 @@ class SelectDirectoryDialog : public ui::SelectFileDialog::Listener,
NULL,
0,
base::FilePath::StringType(),
- platform_util::GetTopLevel(web_contents_->GetView()->GetNativeView()),
+ platform_util::GetTopLevel(web_contents_->GetNativeView()),
NULL);
}
diff --git a/chrome/browser/extensions/api/messaging/incognito_connectability.cc b/chrome/browser/extensions/api/messaging/incognito_connectability.cc
index c8d59ee..ae1baa4 100644
--- a/chrome/browser/extensions/api/messaging/incognito_connectability.cc
+++ b/chrome/browser/extensions/api/messaging/incognito_connectability.cc
@@ -11,7 +11,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/simple_message_box.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/common/extension.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -79,8 +78,7 @@ bool IncognitoConnectability::Query(const Extension* extension,
IDS_EXTENSION_PROMPT_APP_CONNECT_FROM_INCOGNITO :
IDS_EXTENSION_PROMPT_EXTENSION_CONNECT_FROM_INCOGNITO;
result = chrome::ShowMessageBox(
- web_contents ? web_contents->GetView()->GetTopLevelNativeWindow()
- : NULL,
+ web_contents ? web_contents->GetTopLevelNativeWindow() : NULL,
base::string16(), // no title
l10n_util::GetStringFUTF16(template_id,
base::UTF8ToUTF16(origin.spec()),
diff --git a/chrome/browser/extensions/api/sessions/sessions_api.cc b/chrome/browser/extensions/api/sessions/sessions_api.cc
index f0f8ddb..a484be4 100644
--- a/chrome/browser/extensions/api/sessions/sessions_api.cc
+++ b/chrome/browser/extensions/api/sessions/sessions_api.cc
@@ -405,7 +405,7 @@ void SessionsRestoreFunction::SetInvalidIdError(const std::string& invalid_id) {
void SessionsRestoreFunction::SetResultRestoredTab(
- const content::WebContents* contents) {
+ content::WebContents* contents) {
scoped_ptr<base::DictionaryValue> tab_value(
ExtensionTabUtil::CreateTabValue(contents, GetExtension()));
scoped_ptr<tabs::Tab> tab(tabs::Tab::FromValue(*tab_value));
diff --git a/chrome/browser/extensions/api/sessions/sessions_api.h b/chrome/browser/extensions/api/sessions/sessions_api.h
index f30d371..da0305c 100644
--- a/chrome/browser/extensions/api/sessions/sessions_api.h
+++ b/chrome/browser/extensions/api/sessions/sessions_api.h
@@ -73,7 +73,7 @@ class SessionsRestoreFunction : public ChromeSyncExtensionFunction {
private:
void SetInvalidIdError(const std::string& invalid_id);
- void SetResultRestoredTab(const content::WebContents* contents);
+ void SetResultRestoredTab(content::WebContents* contents);
bool SetResultRestoredWindow(int window_id);
bool RestoreMostRecentlyClosed(Browser* browser);
bool RestoreLocalSession(const SessionId& session_id, Browser* browser);
diff --git a/chrome/browser/extensions/api/streams_private/streams_private_api.cc b/chrome/browser/extensions/api/streams_private/streams_private_api.cc
index 66bf858..1a1445a 100644
--- a/chrome/browser/extensions/api/streams_private/streams_private_api.cc
+++ b/chrome/browser/extensions/api/streams_private/streams_private_api.cc
@@ -59,7 +59,7 @@ StreamsPrivateAPI::~StreamsPrivateAPI() {
void StreamsPrivateAPI::ExecuteMimeTypeHandler(
const std::string& extension_id,
- const content::WebContents* web_contents,
+ content::WebContents* web_contents,
scoped_ptr<content::StreamHandle> stream,
int64 expected_content_size) {
// Create the event's arguments value.
diff --git a/chrome/browser/extensions/api/streams_private/streams_private_api.h b/chrome/browser/extensions/api/streams_private/streams_private_api.h
index fcf7245..0ac149f 100644
--- a/chrome/browser/extensions/api/streams_private/streams_private_api.h
+++ b/chrome/browser/extensions/api/streams_private/streams_private_api.h
@@ -31,7 +31,7 @@ class StreamsPrivateAPI : public BrowserContextKeyedAPI,
virtual ~StreamsPrivateAPI();
void ExecuteMimeTypeHandler(const std::string& extension_id,
- const content::WebContents* web_contents,
+ content::WebContents* web_contents,
scoped_ptr<content::StreamHandle> stream,
int64 expected_content_size);
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
index ae2261f..d0ca7fe 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -62,7 +62,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/url_constants.h"
#include "extensions/browser/extension_function_dispatcher.h"
#include "extensions/browser/extension_function_util.h"
@@ -834,7 +833,7 @@ bool TabsQueryFunction::RunSync() {
TabStripModel* tab_strip = browser->tab_strip_model();
for (int i = 0; i < tab_strip->count(); ++i) {
- const WebContents* web_contents = tab_strip->GetWebContentsAt(i);
+ WebContents* web_contents = tab_strip->GetWebContentsAt(i);
if (index > -1 && i != index)
continue;
diff --git a/chrome/browser/extensions/api/tabs/tabs_event_router.cc b/chrome/browser/extensions/api/tabs/tabs_event_router.cc
index 4957647..4e93b40 100644
--- a/chrome/browser/extensions/api/tabs/tabs_event_router.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_event_router.cc
@@ -203,8 +203,8 @@ void TabsEventRouter::TabCreatedAt(WebContents* contents,
}
void TabsEventRouter::TabInsertedAt(WebContents* contents,
- int index,
- bool active) {
+ int index,
+ bool active) {
// If tab is new, send created event.
int tab_id = ExtensionTabUtil::GetTabId(contents);
if (!GetTabEntry(contents)) {
@@ -472,8 +472,7 @@ void TabsEventRouter::DispatchTabUpdatedEvent(
EventRouter::Get(profile)->BroadcastEvent(event.Pass());
}
-TabsEventRouter::TabEntry* TabsEventRouter::GetTabEntry(
- const WebContents* contents) {
+TabsEventRouter::TabEntry* TabsEventRouter::GetTabEntry(WebContents* contents) {
int tab_id = ExtensionTabUtil::GetTabId(contents);
std::map<int, TabEntry>::iterator i = tab_entries_.find(tab_id);
if (tab_entries_.end() == i)
diff --git a/chrome/browser/extensions/api/tabs/tabs_event_router.h b/chrome/browser/extensions/api/tabs/tabs_event_router.h
index 461786a..12ecfb7 100644
--- a/chrome/browser/extensions/api/tabs/tabs_event_router.h
+++ b/chrome/browser/extensions/api/tabs/tabs_event_router.h
@@ -156,7 +156,7 @@ class TabsEventRouter : public TabStripModelObserver,
// Gets the TabEntry for the given |contents|. Returns TabEntry* if
// found, NULL if not.
- TabEntry* GetTabEntry(const content::WebContents* contents);
+ TabEntry* GetTabEntry(content::WebContents* contents);
std::map<int, TabEntry> tab_entries_;
diff --git a/chrome/browser/extensions/extension_install_prompt.cc b/chrome/browser/extensions/extension_install_prompt.cc
index 569124f..76f5a37 100644
--- a/chrome/browser/extensions/extension_install_prompt.cc
+++ b/chrome/browser/extensions/extension_install_prompt.cc
@@ -26,7 +26,6 @@
#include "chrome/common/pref_names.h"
#include "components/signin/core/browser/profile_oauth2_token_service.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_icon_set.h"
@@ -187,7 +186,7 @@ gfx::NativeWindow NativeWindowForWebContents(content::WebContents* contents) {
if (!contents)
return NULL;
- return contents->GetView()->GetTopLevelNativeWindow();
+ return contents->GetTopLevelNativeWindow();
}
} // namespace
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index 7041441..1cde659 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -27,7 +27,6 @@
#include "content/public/browser/favicon_status.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/common/constants.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/extension.h"
@@ -92,13 +91,11 @@ Browser* CreateBrowser(ChromeUIThreadExtensionFunction* function,
std::string* error) {
content::WebContents* web_contents = function->GetAssociatedWebContents();
DCHECK(web_contents);
- DCHECK(web_contents->GetView());
- DCHECK(web_contents->GetView()->GetNativeView());
+ DCHECK(web_contents->GetNativeView());
DCHECK(!chrome::FindBrowserWithWebContents(web_contents));
chrome::HostDesktopType desktop_type =
- chrome::GetHostDesktopTypeForNativeView(
- web_contents->GetView()->GetNativeView());
+ chrome::GetHostDesktopTypeForNativeView(web_contents->GetNativeView());
Browser::CreateParams params(
Browser::TYPE_TABBED, function->GetProfile(), desktop_type);
Browser* browser = new Browser(params);
@@ -247,7 +244,7 @@ base::DictionaryValue* ExtensionTabUtil::OpenTab(
tab_strip->SetOpenerOfWebContentsAt(new_index, opener);
if (active)
- navigate_params.target_contents->GetView()->SetInitialFocus();
+ navigate_params.target_contents->SetInitialFocus();
// Return data about the newly created tab.
return ExtensionTabUtil::CreateTabValue(navigate_params.target_contents,
@@ -289,7 +286,7 @@ int ExtensionTabUtil::GetWindowIdOfTabStripModel(
return -1;
}
-int ExtensionTabUtil::GetTabId(const WebContents* web_contents) {
+int ExtensionTabUtil::GetTabId(WebContents* web_contents) {
return SessionID::IdForTab(web_contents);
}
@@ -302,7 +299,7 @@ int ExtensionTabUtil::GetWindowIdOfTab(const WebContents* web_contents) {
}
base::DictionaryValue* ExtensionTabUtil::CreateTabValue(
- const WebContents* contents,
+ WebContents* contents,
TabStripModel* tab_strip,
int tab_index,
const Extension* extension) {
@@ -335,7 +332,7 @@ base::ListValue* ExtensionTabUtil::CreateTabList(
}
base::DictionaryValue* ExtensionTabUtil::CreateTabValue(
- const WebContents* contents,
+ WebContents* contents,
TabStripModel* tab_strip,
int tab_index) {
// If we have a matching AppWindow with a controller, get the tab value
@@ -364,9 +361,9 @@ base::DictionaryValue* ExtensionTabUtil::CreateTabValue(
result->SetBoolean(keys::kIncognitoKey,
contents->GetBrowserContext()->IsOffTheRecord());
result->SetInteger(keys::kWidthKey,
- contents->GetView()->GetContainerSize().width());
+ contents->GetContainerBounds().size().width());
result->SetInteger(keys::kHeightKey,
- contents->GetView()->GetContainerSize().height());
+ contents->GetContainerBounds().size().height());
// Privacy-sensitive fields: these should be stripped off by
// ScrubTabValueForExtension if the extension should not see them.
@@ -388,7 +385,7 @@ base::DictionaryValue* ExtensionTabUtil::CreateTabValue(
}
void ExtensionTabUtil::ScrubTabValueForExtension(
- const WebContents* contents,
+ WebContents* contents,
const Extension* extension,
base::DictionaryValue* tab_info) {
bool has_permission =
diff --git a/chrome/browser/extensions/extension_tab_util.h b/chrome/browser/extensions/extension_tab_util.h
index b997aa3..c7e201f 100644
--- a/chrome/browser/extensions/extension_tab_util.h
+++ b/chrome/browser/extensions/extension_tab_util.h
@@ -60,7 +60,7 @@ class ExtensionTabUtil {
static int GetWindowId(const Browser* browser);
static int GetWindowIdOfTabStripModel(const TabStripModel* tab_strip_model);
- static int GetTabId(const content::WebContents* web_contents);
+ static int GetTabId(content::WebContents* web_contents);
static std::string GetTabStatusText(bool is_loading);
static int GetWindowIdOfTab(const content::WebContents* web_contents);
static base::ListValue* CreateTabList(const Browser* browser,
@@ -75,12 +75,12 @@ class ExtensionTabUtil {
// permissions of the extension, the object may or may not include sensitive
// data such as the tab's URL.
static base::DictionaryValue* CreateTabValue(
- const content::WebContents* web_contents,
+ content::WebContents* web_contents,
const Extension* extension) {
return CreateTabValue(web_contents, NULL, -1, extension);
}
static base::DictionaryValue* CreateTabValue(
- const content::WebContents* web_contents,
+ content::WebContents* web_contents,
TabStripModel* tab_strip,
int tab_index,
const Extension* extension);
@@ -88,18 +88,18 @@ class ExtensionTabUtil {
// Creates a Tab object but performs no extension permissions checks; the
// returned object will contain privacy-sensitive data.
static base::DictionaryValue* CreateTabValue(
- const content::WebContents* web_contents) {
+ content::WebContents* web_contents) {
return CreateTabValue(web_contents, NULL, -1);
}
static base::DictionaryValue* CreateTabValue(
- const content::WebContents* web_contents,
+ content::WebContents* web_contents,
TabStripModel* tab_strip,
int tab_index);
// Removes any privacy-sensitive fields from a Tab object if appropriate,
// given the permissions of the extension and the tab in question. The
// tab_info object is modified in place.
- static void ScrubTabValueForExtension(const content::WebContents* contents,
+ static void ScrubTabValueForExtension(content::WebContents* contents,
const Extension* extension,
base::DictionaryValue* tab_info);
diff --git a/chrome/browser/extensions/extension_tab_util_android.cc b/chrome/browser/extensions/extension_tab_util_android.cc
index da7be3f..9d0abe8 100644
--- a/chrome/browser/extensions/extension_tab_util_android.cc
+++ b/chrome/browser/extensions/extension_tab_util_android.cc
@@ -26,7 +26,7 @@ int ExtensionTabUtil::GetWindowIdOfTabStripModel(
}
// static
-int ExtensionTabUtil::GetTabId(const WebContents* web_contents) {
+int ExtensionTabUtil::GetTabId(WebContents* web_contents) {
return SessionID::IdForTab(web_contents);
}
@@ -38,7 +38,7 @@ int ExtensionTabUtil::GetWindowIdOfTab(const WebContents* web_contents) {
// static
base::DictionaryValue* ExtensionTabUtil::CreateTabValue(
- const WebContents* contents,
+ WebContents* contents,
TabStripModel* tab_strip,
int tab_index,
const Extension* extension) {
@@ -55,7 +55,7 @@ base::ListValue* ExtensionTabUtil::CreateTabList(const Browser* browser,
// static
base::DictionaryValue* ExtensionTabUtil::CreateTabValue(
- const WebContents* contents,
+ WebContents* contents,
TabStripModel* tab_strip,
int tab_index) {
NOTIMPLEMENTED();
diff --git a/chrome/browser/extensions/extension_view_host.cc b/chrome/browser/extensions/extension_view_host.cc
index 3bdad60..b5ace6b 100644
--- a/chrome/browser/extensions/extension_view_host.cc
+++ b/chrome/browser/extensions/extension_view_host.cc
@@ -15,7 +15,6 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/runtime_data.h"
#include "extensions/common/extension_messages.h"
@@ -276,7 +275,7 @@ ExtensionViewHost::GetWebContentsModalDialogHost() {
}
bool ExtensionViewHost::IsWebContentsVisible(WebContents* web_contents) {
- return platform_util::IsVisible(web_contents->GetView()->GetNativeView());
+ return platform_util::IsVisible(web_contents->GetNativeView());
}
gfx::NativeView ExtensionViewHost::GetHostView() const {
@@ -286,7 +285,7 @@ gfx::NativeView ExtensionViewHost::GetHostView() const {
gfx::Point ExtensionViewHost::GetDialogPosition(const gfx::Size& size) {
if (!GetVisibleWebContents())
return gfx::Point();
- gfx::Rect bounds = GetVisibleWebContents()->GetView()->GetViewBounds();
+ gfx::Rect bounds = GetVisibleWebContents()->GetViewBounds();
return gfx::Point(
std::max(0, (bounds.width() - size.width()) / 2),
std::max(0, (bounds.height() - size.height()) / 2));
@@ -295,7 +294,7 @@ gfx::Point ExtensionViewHost::GetDialogPosition(const gfx::Size& size) {
gfx::Size ExtensionViewHost::GetMaximumDialogSize() {
if (!GetVisibleWebContents())
return gfx::Size();
- return GetVisibleWebContents()->GetView()->GetViewBounds().size();
+ return GetVisibleWebContents()->GetViewBounds().size();
}
void ExtensionViewHost::AddObserver(
diff --git a/chrome/browser/extensions/tab_helper.cc b/chrome/browser/extensions/tab_helper.cc
index 76bed7b..fda6175 100644
--- a/chrome/browser/extensions/tab_helper.cc
+++ b/chrome/browser/extensions/tab_helper.cc
@@ -51,7 +51,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/frame_navigate_params.h"
#include "extensions/browser/extension_error.h"
#include "extensions/browser/extension_registry.h"
@@ -342,7 +341,7 @@ void TabHelper::OnDidGetApplicationInfo(int32 page_id,
switch (pending_web_app_action_) {
case CREATE_SHORTCUT: {
chrome::ShowCreateWebAppShortcutsDialog(
- web_contents()->GetView()->GetTopLevelNativeWindow(),
+ web_contents()->GetTopLevelNativeWindow(),
web_contents());
break;
}