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/panels/panel_browser_window_gtk.h" | 5 #include "chrome/browser/ui/panels/panel_browser_window_gtk.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/ui/browser_list.h" | 8 #include "chrome/browser/ui/browser_list.h" |
9 #include "chrome/browser/ui/gtk/browser_titlebar.h" | 9 #include "chrome/browser/ui/gtk/browser_titlebar.h" |
10 #include "chrome/browser/ui/panels/panel.h" | 10 #include "chrome/browser/ui/panels/panel.h" |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 } | 473 } |
474 | 474 |
475 void PanelBrowserWindowGtk::EnsurePanelFullyVisible() { | 475 void PanelBrowserWindowGtk::EnsurePanelFullyVisible() { |
476 gtk_window_present(window()); | 476 gtk_window_present(window()); |
477 } | 477 } |
478 | 478 |
479 void PanelBrowserWindowGtk::SetPanelAppIconVisibility(bool visible) { | 479 void PanelBrowserWindowGtk::SetPanelAppIconVisibility(bool visible) { |
480 return; | 480 return; |
481 } | 481 } |
482 | 482 |
| 483 void PanelBrowserWindowGtk::SetPanelAlwaysOnTop(bool on_top) { |
| 484 gtk_window_set_keep_above(window(), on_top); |
| 485 } |
| 486 |
483 gfx::Size PanelBrowserWindowGtk::WindowSizeFromContentSize( | 487 gfx::Size PanelBrowserWindowGtk::WindowSizeFromContentSize( |
484 const gfx::Size& content_size) const { | 488 const gfx::Size& content_size) const { |
485 gfx::Size frame = GetNonClientFrameSize(); | 489 gfx::Size frame = GetNonClientFrameSize(); |
486 return gfx::Size(content_size.width() + frame.width(), | 490 return gfx::Size(content_size.width() + frame.width(), |
487 content_size.height() + frame.height()); | 491 content_size.height() + frame.height()); |
488 } | 492 } |
489 | 493 |
490 gfx::Size PanelBrowserWindowGtk::ContentSizeFromWindowSize( | 494 gfx::Size PanelBrowserWindowGtk::ContentSizeFromWindowSize( |
491 const gfx::Size& window_size) const { | 495 const gfx::Size& window_size) const { |
492 gfx::Size frame = GetNonClientFrameSize(); | 496 gfx::Size frame = GetNonClientFrameSize(); |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 MessageLoopForUI::current()->RunAllPending(); | 877 MessageLoopForUI::current()->RunAllPending(); |
874 } | 878 } |
875 | 879 |
876 bool NativePanelTestingGtk::IsWindowSizeKnown() const { | 880 bool NativePanelTestingGtk::IsWindowSizeKnown() const { |
877 return panel_browser_window_gtk_->window_size_known_; | 881 return panel_browser_window_gtk_->window_size_known_; |
878 } | 882 } |
879 | 883 |
880 bool NativePanelTestingGtk::IsAnimatingBounds() const { | 884 bool NativePanelTestingGtk::IsAnimatingBounds() const { |
881 return panel_browser_window_gtk_->IsAnimatingBounds(); | 885 return panel_browser_window_gtk_->IsAnimatingBounds(); |
882 } | 886 } |
OLD | NEW |