| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h" | 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
| 6 | 6 |
| 7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
| 8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 2544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2555 GtkWidget* parent = gtk_widget_get_parent(bookmark_bar_->widget()); | 2555 GtkWidget* parent = gtk_widget_get_parent(bookmark_bar_->widget()); |
| 2556 if (parent != target_parent) { | 2556 if (parent != target_parent) { |
| 2557 if (parent) | 2557 if (parent) |
| 2558 gtk_container_remove(GTK_CONTAINER(parent), bookmark_bar_->widget()); | 2558 gtk_container_remove(GTK_CONTAINER(parent), bookmark_bar_->widget()); |
| 2559 | 2559 |
| 2560 gtk_box_pack_end(GTK_BOX(target_parent), bookmark_bar_->widget(), | 2560 gtk_box_pack_end(GTK_BOX(target_parent), bookmark_bar_->widget(), |
| 2561 FALSE, FALSE, 0); | 2561 FALSE, FALSE, 0); |
| 2562 } | 2562 } |
| 2563 } | 2563 } |
| 2564 | 2564 |
| 2565 void BrowserWindowGtk::ShowSettingsMenu(GtkWidget* widget, | |
| 2566 GdkEventButton* event) { | |
| 2567 // Nothing to do. Panel window will override this. | |
| 2568 } | |
| 2569 | |
| 2570 BrowserWindowGtk::TitleDecoration BrowserWindowGtk::GetWindowTitle( | 2565 BrowserWindowGtk::TitleDecoration BrowserWindowGtk::GetWindowTitle( |
| 2571 std::string* title) const { | 2566 std::string* title) const { |
| 2572 *title = UTF16ToUTF8(browser()->GetWindowTitleForCurrentTab()); | 2567 *title = UTF16ToUTF8(browser()->GetWindowTitleForCurrentTab()); |
| 2573 return PLAIN_TEXT; | 2568 return PLAIN_TEXT; |
| 2574 } | 2569 } |
| 2575 | 2570 |
| 2576 bool BrowserWindowGtk::ShouldShowCloseButton() const { | 2571 bool BrowserWindowGtk::ShouldShowCloseButton() const { |
| 2577 return true; | 2572 return true; |
| 2578 } | 2573 } |
| 2579 | 2574 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2596 wm_type == ui::WM_OPENBOX || | 2591 wm_type == ui::WM_OPENBOX || |
| 2597 wm_type == ui::WM_XFWM4); | 2592 wm_type == ui::WM_XFWM4); |
| 2598 } | 2593 } |
| 2599 | 2594 |
| 2600 // static | 2595 // static |
| 2601 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2596 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2602 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2597 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2603 browser_window_gtk->Init(); | 2598 browser_window_gtk->Init(); |
| 2604 return browser_window_gtk; | 2599 return browser_window_gtk; |
| 2605 } | 2600 } |
| OLD | NEW |