| 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/gtk/custom_button.h" | 10 #include "chrome/browser/ui/gtk/custom_button.h" |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 gboolean PanelBrowserWindowGtk::OnTitlebarButtonReleaseEvent( | 566 gboolean PanelBrowserWindowGtk::OnTitlebarButtonReleaseEvent( |
| 567 GtkWidget* widget, GdkEventButton* event) { | 567 GtkWidget* widget, GdkEventButton* event) { |
| 568 if (event->button != 1) | 568 if (event->button != 1) |
| 569 return TRUE; | 569 return TRUE; |
| 570 | 570 |
| 571 panel_->OnTitlebarClicked((event->state & GDK_CONTROL_MASK) ? | 571 panel_->OnTitlebarClicked((event->state & GDK_CONTROL_MASK) ? |
| 572 panel::APPLY_TO_ALL : panel::NO_MODIFIER); | 572 panel::APPLY_TO_ALL : panel::NO_MODIFIER); |
| 573 return TRUE; | 573 return TRUE; |
| 574 } | 574 } |
| 575 | 575 |
| 576 void PanelBrowserWindowGtk::PanelExpansionStateChanging( |
| 577 Panel::ExpansionState old_state, Panel::ExpansionState new_state) { |
| 578 } |
| 579 |
| 576 // NativePanelTesting implementation. | 580 // NativePanelTesting implementation. |
| 577 class NativePanelTestingGtk : public NativePanelTesting { | 581 class NativePanelTestingGtk : public NativePanelTesting { |
| 578 public: | 582 public: |
| 579 explicit NativePanelTestingGtk( | 583 explicit NativePanelTestingGtk( |
| 580 PanelBrowserWindowGtk* panel_browser_window_gtk); | 584 PanelBrowserWindowGtk* panel_browser_window_gtk); |
| 581 | 585 |
| 582 private: | 586 private: |
| 583 virtual void PressLeftMouseButtonTitlebar( | 587 virtual void PressLeftMouseButtonTitlebar( |
| 584 const gfx::Point& mouse_location, panel::ClickModifier modifier) OVERRIDE; | 588 const gfx::Point& mouse_location, panel::ClickModifier modifier) OVERRIDE; |
| 585 virtual void ReleaseMouseButtonTitlebar( | 589 virtual void ReleaseMouseButtonTitlebar( |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 break; | 712 break; |
| 709 case RESTORE_BUTTON: | 713 case RESTORE_BUTTON: |
| 710 button = titlebar->unminimize_button(); | 714 button = titlebar->unminimize_button(); |
| 711 break; | 715 break; |
| 712 default: | 716 default: |
| 713 NOTREACHED(); | 717 NOTREACHED(); |
| 714 return false; | 718 return false; |
| 715 } | 719 } |
| 716 return gtk_widget_get_visible(button->widget()); | 720 return gtk_widget_get_visible(button->widget()); |
| 717 } | 721 } |
| OLD | NEW |