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 "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
10 | 10 |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "base/memory/scoped_ptr.h" | |
jennb
2012/05/18 23:17:01
Could you leave this one unchanged? I'm currently
Lei Zhang
2012/05/18 23:22:23
Sure.
| |
13 #include "chrome/browser/ui/panels/panel_constants.h" | 12 #include "chrome/browser/ui/panels/panel_constants.h" |
14 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 13 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
15 #include "content/public/browser/notification_observer.h" | 14 #include "content/public/browser/notification_observer.h" |
16 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
17 #include "ui/gfx/rect.h" | 16 #include "ui/gfx/rect.h" |
18 | 17 |
19 class NativePanel; | 18 class NativePanel; |
20 class PanelManager; | 19 class PanelManager; |
21 class PanelStrip; | 20 class PanelStrip; |
22 | 21 |
23 // A platform independent implementation of BrowserWindow for Panels. This | 22 // A platform independent implementation of BrowserWindow for Panels. This |
24 // class would get the first crack at all the BrowserWindow calls for Panels and | 23 // class would get the first crack at all the BrowserWindow calls for Panels and |
25 // do one or more of the following: | 24 // do one or more of the following: |
26 // - Do nothing. The function is not relevant to Panels. | 25 // - Do nothing. The function is not relevant to Panels. |
27 // - Throw an exceptions. The function shouldn't be called for Panels. | 26 // - Throw an exceptions. The function shouldn't be called for Panels. |
28 // - Do Panel specific platform independent processing and then invoke the | 27 // - Do Panel specific platform independent processing and then invoke the |
29 // function on the platform specific BrowserWindow member. For example, | 28 // function on the platform specific BrowserWindow member. For example, |
30 // Panel size is restricted to certain limits. | 29 // Panel size is restricted to certain limits. |
31 // - Invoke an appropriate PanelManager function to do stuff that might affect | 30 // - Invoke an appropriate PanelManager function to do stuff that might affect |
32 // other Panels. For example deleting a panel would rearrange other panels. | 31 // other Panels. For example deleting a panel would rearrange other panels. |
33 class Panel : public BrowserWindow, | 32 class Panel : public BrowserWindow, |
34 public TabStripModelObserver, | 33 public TabStripModelObserver, |
35 public content::NotificationObserver { | 34 public content::NotificationObserver { |
36 public: | 35 public: |
37 enum ExpansionState { | 36 enum ExpansionState { |
38 // The panel is fully expanded with both title-bar and the client-area. | 37 // The panel is fully expanded with both title-bar and the client-area. |
39 EXPANDED, | 38 EXPANDED, |
40 // The panel is shown with the title-bar only. | 39 // The panel is shown with the title-bar only. |
41 TITLE_ONLY, | 40 TITLE_ONLY, |
42 // The panel is shown with 3-pixel line. | 41 // The panel is shown with 3-pixel line. |
43 MINIMIZED | 42 MINIMIZED |
44 }; | 43 }; |
45 | 44 |
46 // Controls how the attention should be drawn. | 45 // Controls how the attention should be drawn. |
47 enum AttentionMode { | 46 enum AttentionMode { |
48 // Uses the panel attention. The panel's titlebar would be painted | 47 // Uses the panel attention. The panel's titlebar would be painted |
49 // differently to attract the user's attention. This is the default mode. | 48 // differently to attract the user's attention. This is the default mode. |
50 USE_PANEL_ATTENTION = 0x01, | 49 USE_PANEL_ATTENTION = 0x01, |
51 // Uses the system attention. On Windows or Linux (depending on Window | 50 // Uses the system attention. On Windows or Linux (depending on Window |
52 // Manager), the app icon on taskbar will be flashed. On MacOS, the dock | 51 // Manager), the app icon on taskbar will be flashed. On MacOS, the dock |
53 // icon will jump once. | 52 // icon will jump once. |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
387 AttentionMode attention_mode_; | 386 AttentionMode attention_mode_; |
388 | 387 |
389 ExpansionState expansion_state_; | 388 ExpansionState expansion_state_; |
390 | 389 |
391 content::NotificationRegistrar registrar_; | 390 content::NotificationRegistrar registrar_; |
392 | 391 |
393 DISALLOW_COPY_AND_ASSIGN(Panel); | 392 DISALLOW_COPY_AND_ASSIGN(Panel); |
394 }; | 393 }; |
395 | 394 |
396 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ | 395 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ |
OLD | NEW |