summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-19 17:26:23 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-19 17:26:23 +0000
commitf3735c5dc0269579afc173d9e519243c305e1186 (patch)
treefbaa17da8e7756c15d98c9b03c137bfdd93b5007 /chrome/browser/gtk
parentd6f0c649a8584be915f1ef12abbaab318b50376c (diff)
downloadchromium_src-f3735c5dc0269579afc173d9e519243c305e1186.zip
chromium_src-f3735c5dc0269579afc173d9e519243c305e1186.tar.gz
chromium_src-f3735c5dc0269579afc173d9e519243c305e1186.tar.bz2
Render into a ChromeCanvasPaint object in a RootView under Linux.
Review URL: http://codereview.chromium.org/45014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12097 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/browser_window_gtk.cc13
-rw-r--r--chrome/browser/gtk/browser_window_gtk.h4
2 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index 24a03bf..f938005 100644
--- a/chrome/browser/gtk/browser_window_gtk.cc
+++ b/chrome/browser/gtk/browser_window_gtk.cc
@@ -7,6 +7,7 @@
#include <gdk/gdkkeysyms.h>
#include "base/base_paths_linux.h"
+#include "base/command_line.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/path_service.h"
@@ -21,6 +22,7 @@
#include "chrome/browser/location_bar.h"
#include "chrome/browser/renderer_host/render_widget_host_view_gtk.h"
#include "chrome/browser/tab_contents/web_contents.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/resource_bundle.h"
#include "grit/theme_resources.h"
@@ -147,6 +149,17 @@ BrowserWindowGtk::BrowserWindowGtk(Browser* browser)
g_signal_connect(G_OBJECT(vbox_), "expose-event",
G_CALLBACK(&OnContentAreaExpose), this);
+ // Temporary hack hidden behind a command line option to add one of the
+ // experimental ViewsGtk objects to the Gtk hierarchy.
+ const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
+ if (parsed_command_line.HasSwitch(switches::kViewsGtk)) {
+ experimental_widget_.reset(new views::WidgetGtk());
+ experimental_widget_->Init(gfx::Rect(), false);
+ gtk_box_pack_start(GTK_BOX(vbox_),
+ experimental_widget_->GetNativeView(),
+ false, false, 2);
+ }
+
toolbar_.reset(new BrowserToolbarGtk(browser_.get()));
toolbar_->Init(browser_->profile(), window_);
toolbar_->AddToolbarToBox(vbox_);
diff --git a/chrome/browser/gtk/browser_window_gtk.h b/chrome/browser/gtk/browser_window_gtk.h
index 24f7449..8811473 100644
--- a/chrome/browser/gtk/browser_window_gtk.h
+++ b/chrome/browser/gtk/browser_window_gtk.h
@@ -11,6 +11,7 @@
#include "base/scoped_ptr.h"
#include "chrome/browser/browser_window.h"
#include "chrome/browser/tabs/tab_strip_model.h"
+#include "chrome/views/widget/widget_gtk.h"
class BrowserToolbarGtk;
class FindBarController;
@@ -137,6 +138,9 @@ class BrowserWindowGtk : public BrowserWindow,
// non-NULL, it may or may not be visible. It is possible for the Find Bar
// to move among windows as tabs are dragged around.
scoped_ptr<FindBarController> find_bar_controller_;
+
+ // Experiment with using views for gtk.
+ scoped_ptr<views::WidgetGtk> experimental_widget_;
};
#endif // CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_