| 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 <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 gtk_widget_set_size_request(contents_container_->widget(), -1, -1); | 603 gtk_widget_set_size_request(contents_container_->widget(), -1, -1); |
| 604 | 604 |
| 605 browser()->OnWindowDidShow(); | 605 browser()->OnWindowDidShow(); |
| 606 } | 606 } |
| 607 | 607 |
| 608 void BrowserWindowGtk::ShowInactive() { | 608 void BrowserWindowGtk::ShowInactive() { |
| 609 gtk_window_set_focus_on_map(window_, false); | 609 gtk_window_set_focus_on_map(window_, false); |
| 610 gtk_widget_show(GTK_WIDGET(window_)); | 610 gtk_widget_show(GTK_WIDGET(window_)); |
| 611 } | 611 } |
| 612 | 612 |
| 613 void BrowserWindowGtk::Hide() { |
| 614 // Not implemented. |
| 615 } |
| 616 |
| 613 void BrowserWindowGtk::SetBoundsImpl(const gfx::Rect& bounds, | 617 void BrowserWindowGtk::SetBoundsImpl(const gfx::Rect& bounds, |
| 614 bool exterior, | 618 bool exterior, |
| 615 bool move) { | 619 bool move) { |
| 616 gint x = static_cast<gint>(bounds.x()); | 620 gint x = static_cast<gint>(bounds.x()); |
| 617 gint y = static_cast<gint>(bounds.y()); | 621 gint y = static_cast<gint>(bounds.y()); |
| 618 gint width = static_cast<gint>(bounds.width()); | 622 gint width = static_cast<gint>(bounds.width()); |
| 619 gint height = static_cast<gint>(bounds.height()); | 623 gint height = static_cast<gint>(bounds.height()); |
| 620 | 624 |
| 621 if (move) | 625 if (move) |
| 622 gtk_window_move(window_, x, y); | 626 gtk_window_move(window_, x, y); |
| (...skipping 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2433 wm_type == ui::WM_OPENBOX || | 2437 wm_type == ui::WM_OPENBOX || |
| 2434 wm_type == ui::WM_XFWM4); | 2438 wm_type == ui::WM_XFWM4); |
| 2435 } | 2439 } |
| 2436 | 2440 |
| 2437 // static | 2441 // static |
| 2438 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2442 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2439 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2443 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2440 browser_window_gtk->Init(); | 2444 browser_window_gtk->Init(); |
| 2441 return browser_window_gtk; | 2445 return browser_window_gtk; |
| 2442 } | 2446 } |
| OLD | NEW |