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