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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 } | 475 } |
476 | 476 |
477 void PanelBrowserWindowGtk::EnsurePanelFullyVisible() { | 477 void PanelBrowserWindowGtk::EnsurePanelFullyVisible() { |
478 gtk_window_present(window()); | 478 gtk_window_present(window()); |
479 } | 479 } |
480 | 480 |
481 void PanelBrowserWindowGtk::SetPanelAppIconVisibility(bool visible) { | 481 void PanelBrowserWindowGtk::SetPanelAppIconVisibility(bool visible) { |
482 return; | 482 return; |
483 } | 483 } |
484 | 484 |
| 485 void PanelBrowserWindowGtk::SetPanelAlwaysOnTop(bool on_top) { |
| 486 gtk_window_set_keep_above(window(), on_top); |
| 487 } |
| 488 |
485 gfx::Size PanelBrowserWindowGtk::WindowSizeFromContentSize( | 489 gfx::Size PanelBrowserWindowGtk::WindowSizeFromContentSize( |
486 const gfx::Size& content_size) const { | 490 const gfx::Size& content_size) const { |
487 gfx::Size frame = GetNonClientFrameSize(); | 491 gfx::Size frame = GetNonClientFrameSize(); |
488 return gfx::Size(content_size.width() + frame.width(), | 492 return gfx::Size(content_size.width() + frame.width(), |
489 content_size.height() + frame.height()); | 493 content_size.height() + frame.height()); |
490 } | 494 } |
491 | 495 |
492 gfx::Size PanelBrowserWindowGtk::ContentSizeFromWindowSize( | 496 gfx::Size PanelBrowserWindowGtk::ContentSizeFromWindowSize( |
493 const gfx::Size& window_size) const { | 497 const gfx::Size& window_size) const { |
494 gfx::Size frame = GetNonClientFrameSize(); | 498 gfx::Size frame = GetNonClientFrameSize(); |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 MessageLoopForUI::current()->RunAllPending(); | 879 MessageLoopForUI::current()->RunAllPending(); |
876 } | 880 } |
877 | 881 |
878 bool NativePanelTestingGtk::IsWindowSizeKnown() const { | 882 bool NativePanelTestingGtk::IsWindowSizeKnown() const { |
879 return panel_browser_window_gtk_->window_size_known_; | 883 return panel_browser_window_gtk_->window_size_known_; |
880 } | 884 } |
881 | 885 |
882 bool NativePanelTestingGtk::IsAnimatingBounds() const { | 886 bool NativePanelTestingGtk::IsAnimatingBounds() const { |
883 return panel_browser_window_gtk_->IsAnimatingBounds(); | 887 return panel_browser_window_gtk_->IsAnimatingBounds(); |
884 } | 888 } |
OLD | NEW |