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

Unified Diff: chrome/browser/gtk/browser_titlebar.cc

Issue 140078: Move the titlebar background drawing from the titlebar to the (Closed)
Patch Set: rebase Created 11 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
« no previous file with comments | « chrome/browser/gtk/browser_titlebar.h ('k') | chrome/browser/gtk/browser_window_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_titlebar.cc
diff --git a/chrome/browser/gtk/browser_titlebar.cc b/chrome/browser/gtk/browser_titlebar.cc
index ff4e329b22d8df5c26aada33e5bd1b197f902863..eab9a7e8a3787a01ca3f7579fa84bd5b7efa29cc 100644
--- a/chrome/browser/gtk/browser_titlebar.cc
+++ b/chrome/browser/gtk/browser_titlebar.cc
@@ -44,13 +44,6 @@ BrowserTitlebar::BrowserTitlebar(BrowserWindowGtk* browser_window,
}
void BrowserTitlebar::Init() {
- titlebar_background_.reset(new NineBox(
- browser_window_->browser()->profile()->GetThemeProvider(),
- 0, IDR_THEME_FRAME, 0, 0, 0, 0, 0, 0, 0));
- titlebar_background_otr_.reset(new NineBox(
- browser_window_->browser()->profile()->GetThemeProvider(),
- 0, IDR_THEME_FRAME_INCOGNITO, 0, 0, 0, 0, 0, 0, 0));
-
// The widget hierarchy is shown below.
//
// +- HBox (container_) --------------------------------------------------+
@@ -64,8 +57,6 @@ void BrowserTitlebar::Init() {
// +----------------------------------------------------------------------+
container_ = gtk_hbox_new(FALSE, 0);
- g_signal_connect(G_OBJECT(container_), "expose-event",
- G_CALLBACK(OnExpose), this);
g_signal_connect(window_, "window-state-event",
G_CALLBACK(OnWindowStateChanged), this);
@@ -130,21 +121,6 @@ void BrowserTitlebar::UpdateCustomFrame(bool use_custom_frame) {
}
}
-gboolean BrowserTitlebar::OnExpose(GtkWidget* widget, GdkEventExpose* e,
- BrowserTitlebar* titlebar) {
- cairo_t* cr = gdk_cairo_create(GDK_DRAWABLE(widget->window));
- cairo_rectangle(cr, e->area.x, e->area.y, e->area.width, e->area.height);
- cairo_clip(cr);
- Profile* profile = titlebar->browser_window_->browser()->profile();
- NineBox* image = profile->IsOffTheRecord()
- ? titlebar->titlebar_background_otr_.get()
- : titlebar->titlebar_background_.get();
- image->RenderTopCenterStrip(cr, e->area.x, 0, e->area.width);
- cairo_destroy(cr);
-
- return FALSE; // Allow subwidgets to paint.
-}
-
gboolean BrowserTitlebar::OnWindowStateChanged(GtkWindow* window,
GdkEventWindowState* event, BrowserTitlebar* titlebar) {
// Update the maximize/restore button.
« no previous file with comments | « chrome/browser/gtk/browser_titlebar.h ('k') | chrome/browser/gtk/browser_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698