summaryrefslogtreecommitdiffstats
path: root/content/shell/shell_gtk.cc
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-19 13:15:40 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-19 13:15:40 +0000
commit59253838dff6df06206732fce124b176d6ca0b6e (patch)
treea161ff1affa84e76f1509b06496e753f06dee388 /content/shell/shell_gtk.cc
parent044752edcf1fa9fd9526db140a072fda9318834c (diff)
downloadchromium_src-59253838dff6df06206732fce124b176d6ca0b6e.zip
chromium_src-59253838dff6df06206732fce124b176d6ca0b6e.tar.gz
chromium_src-59253838dff6df06206732fce124b176d6ca0b6e.tar.bz2
Revert 173751
> [content shell] run headless when in layout test mode > > Currently only for gtk. There's also a command line flag --show-content-shell > which overrides this for debugging > > BUG=111316 > TEST=nothing should change > R=marja@chromium.org > > > Review URL: https://chromiumcodereview.appspot.com/11576003 TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/11649017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173908 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell/shell_gtk.cc')
-rw-r--r--content/shell/shell_gtk.cc24
1 files changed, 2 insertions, 22 deletions
diff --git a/content/shell/shell_gtk.cc b/content/shell/shell_gtk.cc
index 8365ea1..2cfbc47 100644
--- a/content/shell/shell_gtk.cc
+++ b/content/shell/shell_gtk.cc
@@ -62,9 +62,6 @@ void Shell::PlatformCleanUp() {
}
void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) {
- if (headless_)
- return;
-
GtkToolItem* item = NULL;
switch (control) {
case BACK_BUTTON:
@@ -84,16 +81,10 @@ void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) {
}
void Shell::PlatformSetAddressBarURL(const GURL& url) {
- if (headless_)
- return;
-
gtk_entry_set_text(GTK_ENTRY(url_edit_view_), url.spec().c_str());
}
void Shell::PlatformSetIsLoading(bool loading) {
- if (headless_)
- return;
-
if (loading)
gtk_spinner_start(GTK_SPINNER(spinner_));
else
@@ -101,9 +92,6 @@ void Shell::PlatformSetIsLoading(bool loading) {
}
void Shell::PlatformCreateWindow(int width, int height) {
- if (headless_)
- return;
-
window_ = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
gtk_window_set_title(window_, "Content Shell");
g_signal_connect(G_OBJECT(window_), "destroy",
@@ -199,9 +187,6 @@ void Shell::PlatformCreateWindow(int width, int height) {
}
void Shell::PlatformSetContents() {
- if (headless_)
- return;
-
WebContentsView* content_view = web_contents_->GetView();
gtk_container_add(GTK_CONTAINER(vbox_), content_view->GetNativeView());
}
@@ -209,8 +194,9 @@ void Shell::PlatformSetContents() {
void Shell::SizeTo(int width, int height) {
content_width_ = width;
content_height_ = height;
- if (web_contents_.get())
+ if (web_contents_.get()) {
gtk_widget_set_size_request(web_contents_->GetNativeView(), width, height);
+ }
}
void Shell::PlatformResizeSubViews() {
@@ -218,9 +204,6 @@ void Shell::PlatformResizeSubViews() {
}
void Shell::Close() {
- if (headless_)
- return;
-
gtk_widget_destroy(GTK_WIDGET(window_));
}
@@ -286,9 +269,6 @@ gboolean Shell::OnHighlightURLView(GtkAccelGroup* accel_group,
}
void Shell::PlatformSetTitle(const string16& title) {
- if (headless_)
- return;
-
std::string title_utf8 = UTF16ToUTF8(title);
gtk_window_set_title(GTK_WINDOW(window_), title_utf8.c_str());
}