OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <dlfcn.h> | 9 #include <dlfcn.h> |
10 #include <string> | 10 #include <string> |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 if (IsActive()) { | 630 if (IsActive()) { |
631 image_name = incognito ? IDR_THEME_FRAME_INCOGNITO : IDR_THEME_FRAME; | 631 image_name = incognito ? IDR_THEME_FRAME_INCOGNITO : IDR_THEME_FRAME; |
632 } else { | 632 } else { |
633 image_name = incognito ? IDR_THEME_FRAME_INCOGNITO_INACTIVE : | 633 image_name = incognito ? IDR_THEME_FRAME_INCOGNITO_INACTIVE : |
634 IDR_THEME_FRAME_INACTIVE; | 634 IDR_THEME_FRAME_INACTIVE; |
635 } | 635 } |
636 | 636 |
637 return image_name; | 637 return image_name; |
638 } | 638 } |
639 | 639 |
640 void BrowserWindowGtk::Show() { | 640 void BrowserWindowGtk::Show(BrowserWindow::ShowContext show_context) { |
641 // The Browser associated with this browser window must become the active | 641 // The Browser associated with this browser window must become the active |
642 // browser at the time Show() is called. This is the natural behaviour under | 642 // browser at the time Show() is called. This is the natural behaviour under |
643 // Windows, but gtk_widget_show won't show the widget (and therefore won't | 643 // Windows, but gtk_widget_show won't show the widget (and therefore won't |
644 // call OnFocusIn()) until we return to the runloop. Therefore any calls to | 644 // call OnFocusIn()) until we return to the runloop. Therefore any calls to |
645 // BrowserList::GetLastActive() (for example, in bookmark_util), will return | 645 // BrowserList::GetLastActive() (for example, in bookmark_util), will return |
646 // the previous browser instead if we don't explicitly set it here. | 646 // the previous browser instead if we don't explicitly set it here. |
647 BrowserList::SetLastActive(browser()); | 647 BrowserList::SetLastActive(browser()); |
648 | 648 |
649 gtk_window_present(window_); | 649 gtk_window_present(window_); |
650 if (show_state_after_show_ == ui::SHOW_STATE_MAXIMIZED) { | 650 if (show_state_after_show_ == ui::SHOW_STATE_MAXIMIZED) { |
(...skipping 1737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2388 // are taken from the WMs' source code. | 2388 // are taken from the WMs' source code. |
2389 return (wm_name == "Blackbox" || | 2389 return (wm_name == "Blackbox" || |
2390 wm_name == "compiz" || | 2390 wm_name == "compiz" || |
2391 wm_name == "Compiz" || | 2391 wm_name == "Compiz" || |
2392 wm_name == "e16" || // Enlightenment DR16 | 2392 wm_name == "e16" || // Enlightenment DR16 |
2393 wm_name == "Metacity" || | 2393 wm_name == "Metacity" || |
2394 wm_name == "Mutter" || | 2394 wm_name == "Mutter" || |
2395 wm_name == "Openbox" || | 2395 wm_name == "Openbox" || |
2396 wm_name == "Xfwm4"); | 2396 wm_name == "Xfwm4"); |
2397 } | 2397 } |
OLD | NEW |