| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_CHROMEOS_FRAME_PANEL_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FRAME_PANEL_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FRAME_PANEL_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FRAME_PANEL_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 // Delegate to control panel's appearance and behavior. | 38 // Delegate to control panel's appearance and behavior. |
| 39 class Delegate { | 39 class Delegate { |
| 40 public: | 40 public: |
| 41 // Retrieves the title string of the panel. | 41 // Retrieves the title string of the panel. |
| 42 virtual string16 GetPanelTitle() = 0; | 42 virtual string16 GetPanelTitle() = 0; |
| 43 | 43 |
| 44 // Retrieves the icon to use in the panel's titlebar. | 44 // Retrieves the icon to use in the panel's titlebar. |
| 45 virtual SkBitmap GetPanelIcon() = 0; | 45 virtual SkBitmap GetPanelIcon() = 0; |
| 46 | 46 |
| 47 // Can the panel be closed? Called before ClosePanel() when the close |
| 48 // button is pressed to give beforeunload handlers a chance to cancel. |
| 49 virtual bool CanClosePanel() = 0; |
| 50 |
| 47 // Close the panel. Called when a close button is pressed. | 51 // Close the panel. Called when a close button is pressed. |
| 48 virtual void ClosePanel() = 0; | 52 virtual void ClosePanel() = 0; |
| 49 }; | 53 }; |
| 50 | 54 |
| 51 PanelController(Delegate* delegate_window, | 55 PanelController(Delegate* delegate_window, |
| 52 GtkWindow* window); | 56 GtkWindow* window); |
| 53 virtual ~PanelController() {} | 57 virtual ~PanelController() {} |
| 54 | 58 |
| 55 // Initializes the panel controller with the initial state of the focus and | 59 // Initializes the panel controller with the initial state of the focus and |
| 56 // the window bounds. | 60 // the window bounds. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 150 |
| 147 // GTK client event handler id. | 151 // GTK client event handler id. |
| 148 int client_event_handler_id_; | 152 int client_event_handler_id_; |
| 149 | 153 |
| 150 DISALLOW_COPY_AND_ASSIGN(PanelController); | 154 DISALLOW_COPY_AND_ASSIGN(PanelController); |
| 151 }; | 155 }; |
| 152 | 156 |
| 153 } // namespace chromeos | 157 } // namespace chromeos |
| 154 | 158 |
| 155 #endif // CHROME_BROWSER_CHROMEOS_FRAME_PANEL_CONTROLLER_H_ | 159 #endif // CHROME_BROWSER_CHROMEOS_FRAME_PANEL_CONTROLLER_H_ |
| OLD | NEW |