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

Unified Diff: chrome/browser/chromeos/external_protocol_dialog.cc

Issue 9030032: Get rid of a bunch of tab_contents.h includes from chrome. These are all trivial changes to use W... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 12 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/chromeos/external_protocol_dialog.cc
===================================================================
--- chrome/browser/chromeos/external_protocol_dialog.cc (revision 116331)
+++ chrome/browser/chromeos/external_protocol_dialog.cc (working copy)
@@ -11,8 +11,8 @@
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/browser/ui/dialog_style.h"
#include "chrome/browser/ui/views/window.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/public/browser/web_contents.h"
#include "googleurl/src/gurl.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -21,6 +21,8 @@
#include "ui/views/controls/message_box_view.h"
#include "ui/views/widget/widget.h"
+using content::WebContents;
+
namespace {
const int kMessageWidth = 400;
@@ -33,10 +35,10 @@
// static
void ExternalProtocolHandler::RunExternalProtocolDialog(
const GURL& url, int render_process_host_id, int routing_id) {
- TabContents* tab_contents = tab_util::GetTabContentsByID(
+ WebContents* web_contents = tab_util::GetWebContentsByID(
render_process_host_id, routing_id);
- DCHECK(tab_contents);
- new ExternalProtocolDialog(tab_contents, url);
+ DCHECK(web_contents);
+ new ExternalProtocolDialog(web_contents, url);
}
///////////////////////////////////////////////////////////////////////////////
@@ -93,7 +95,7 @@
///////////////////////////////////////////////////////////////////////////////
// ExternalProtocolDialog, private:
-ExternalProtocolDialog::ExternalProtocolDialog(TabContents* tab_contents,
+ExternalProtocolDialog::ExternalProtocolDialog(WebContents* web_contents,
const GURL& url)
: creation_time_(base::TimeTicks::Now()),
scheme_(url.scheme()) {
@@ -116,10 +118,10 @@
l10n_util::GetStringUTF16(IDS_EXTERNAL_PROTOCOL_CHECKBOX_TEXT));
gfx::NativeWindow parent_window;
- if (tab_contents) {
- parent_window = tab_contents->GetView()->GetTopLevelNativeWindow();
+ if (web_contents) {
+ parent_window = web_contents->GetView()->GetTopLevelNativeWindow();
} else {
- // Dialog is top level if we don't have a tab_contents associated with us.
+ // Dialog is top level if we don't have a web_contents associated with us.
parent_window = NULL;
}
browser::CreateViewsWindow(parent_window, this, STYLE_GENERIC)->Show();
« no previous file with comments | « chrome/browser/chromeos/external_protocol_dialog.h ('k') | chrome/browser/chromeos/login/html_page_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698