| 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 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_H_ |
| 6 #define CHROME_BROWSER_UI_PANELS_PANEL_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class GURL; | 24 class GURL; |
| 25 class NativePanel; | 25 class NativePanel; |
| 26 class PanelHost; | 26 class PanelHost; |
| 27 class PanelManager; | 27 class PanelManager; |
| 28 class PanelStrip; | 28 class PanelStrip; |
| 29 class Profile; | 29 class Profile; |
| 30 class SkBitmap; | 30 class SkBitmap; |
| 31 | 31 |
| 32 namespace content { | 32 namespace content { |
| 33 class WebContents; | 33 class WebContents; |
| 34 struct NativeWebKeyboardEvent; |
| 34 } | 35 } |
| 35 | 36 |
| 36 // A platform independent implementation of BaseWindow for Panels. | 37 // A platform independent implementation of BaseWindow for Panels. |
| 37 // This class gets the first crack at all the BaseWindow calls for Panels and | 38 // This class gets the first crack at all the BaseWindow calls for Panels and |
| 38 // does one or more of the following: | 39 // does one or more of the following: |
| 39 // - Do nothing. The function is not relevant to Panels. | 40 // - Do nothing. The function is not relevant to Panels. |
| 40 // - Do Panel specific platform independent processing and then invoke the | 41 // - Do Panel specific platform independent processing and then invoke the |
| 41 // function on the platform specific member. For example, restrict panel | 42 // function on the platform specific member. For example, restrict panel |
| 42 // size to certain limits. | 43 // size to certain limits. |
| 43 // - Invoke an appropriate PanelManager function to do stuff that might affect | 44 // - Invoke an appropriate PanelManager function to do stuff that might affect |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 // Sets minimum and maximum size for the panel. | 238 // Sets minimum and maximum size for the panel. |
| 238 void SetSizeRange(const gfx::Size& min_size, const gfx::Size& max_size); | 239 void SetSizeRange(const gfx::Size& min_size, const gfx::Size& max_size); |
| 239 | 240 |
| 240 // Updates the maximum size of the panel so that it's never smaller than the | 241 // Updates the maximum size of the panel so that it's never smaller than the |
| 241 // panel's desired size. Note that even if the user resizes the panel smaller | 242 // panel's desired size. Note that even if the user resizes the panel smaller |
| 242 // later, the increased maximum size will still be in effect. Since it's not | 243 // later, the increased maximum size will still be in effect. Since it's not |
| 243 // possible currently to switch the panel back to autosizing from | 244 // possible currently to switch the panel back to autosizing from |
| 244 // user-resizable, it should not be a problem. | 245 // user-resizable, it should not be a problem. |
| 245 void IncreaseMaxSize(const gfx::Size& desired_panel_size); | 246 void IncreaseMaxSize(const gfx::Size& desired_panel_size); |
| 246 | 247 |
| 248 // Handles keyboard events coming back from the renderer. |
| 249 void HandleKeyboardEvent(const content::NativeWebKeyboardEvent& event); |
| 250 |
| 247 // Whether the panel window is always on top. | 251 // Whether the panel window is always on top. |
| 248 void SetAlwaysOnTop(bool on_top); | 252 void SetAlwaysOnTop(bool on_top); |
| 249 bool always_on_top() const { return always_on_top_; } | 253 bool always_on_top() const { return always_on_top_; } |
| 250 | 254 |
| 251 // Sets whether the panel is shown in preview mode. When the panel is | 255 // Sets whether the panel is shown in preview mode. When the panel is |
| 252 // being dragged, it is in preview mode. | 256 // being dragged, it is in preview mode. |
| 253 void SetPreviewMode(bool in_preview_mode); | 257 void SetPreviewMode(bool in_preview_mode); |
| 254 | 258 |
| 255 // Sets up the panel for being resizable by the user - for example, | 259 // Sets up the panel for being resizable by the user - for example, |
| 256 // enables the resize mouse cursors when mouse is hovering over the edges. | 260 // enables the resize mouse cursors when mouse is hovering over the edges. |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 | 375 |
| 372 content::NotificationRegistrar registrar_; | 376 content::NotificationRegistrar registrar_; |
| 373 const SessionID session_id_; | 377 const SessionID session_id_; |
| 374 scoped_ptr<ExtensionWindowController> extension_window_controller_; | 378 scoped_ptr<ExtensionWindowController> extension_window_controller_; |
| 375 scoped_ptr<PanelHost> panel_host_; | 379 scoped_ptr<PanelHost> panel_host_; |
| 376 | 380 |
| 377 DISALLOW_COPY_AND_ASSIGN(Panel); | 381 DISALLOW_COPY_AND_ASSIGN(Panel); |
| 378 }; | 382 }; |
| 379 | 383 |
| 380 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ | 384 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ |
| OLD | NEW |