Chromium Code Reviews| Index: ceee/ie/plugin/toolband/tool_band.h |
| =================================================================== |
| --- ceee/ie/plugin/toolband/tool_band.h (revision 71215) |
| +++ ceee/ie/plugin/toolband/tool_band.h (working copy) |
| @@ -50,11 +50,22 @@ |
| public IPersistStream, |
| public ChromeFrameEvents, |
| public HostingBrowserEvents, |
| - public CWindowImpl<ToolBand> { |
| + // WS_CHILD | WS_VISIBLE | TBSTYLE_TRANSPARENT | CCS_NODIVIDER are critical |
|
Sigurður Ásgeirsson
2011/01/14 14:00:43
one last nit: can I ask you to move this to a type
|
| + // for painting toolband background while chrome frame is hidden. |
| + // TBSTYLE_TRANSPARENT makes toolbar same color as rest of IE controls. |
| + // CCS_NODIVIDER removes line above toolbar. |
| + // Rest was copied from IE favorite bar. |
| + public CWindowImpl<ToolBand, CWindow, CWinTraits< |
| + WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | |
| + TBSTYLE_TOOLTIPS | TBSTYLE_TRANSPARENT | TBSTYLE_LIST | TBSTYLE_FLAT | |
| + CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NORESIZE | CCS_TOP, 0>> { |
| public: |
| ToolBand(); |
| ~ToolBand(); |
| + // Subclass TOOLBARCLASSNAME to use TBSTYLE_TRANSPARENT. |
| + DECLARE_WND_SUPERCLASS(NULL, TOOLBARCLASSNAME) |
| + |
| DECLARE_REGISTRY_RESOURCEID_EX(IDR_TOOL_BAND) |
| BEGIN_REGISTRY_MAP(ToolBand) |
| REGMAP_UUID("CLSID", CLSID_ToolBand) |
| @@ -179,7 +190,6 @@ |
| // @name Message handlers. |
| // @{ |
| - void OnPaint(CDCHandle dc); |
| void OnSize(UINT type, CSize size); |
| // @} |
| @@ -198,6 +208,13 @@ |
| virtual HRESULT SendSessionIdToBho(IUnknown* bho); |
| private: |
| + class EmptyWindow : |
| + public CWindowImpl<EmptyWindow, CWindow, CWinTraits<WS_CHILD, 0>> { |
| + public: |
| + BEGIN_MSG_MAP(EmptyWindow) |
| + END_MSG_MAP() |
| + }; |
| + |
| // Initializes the toolband to the given site. |
| // Called from SetSite. |
| HRESULT Initialize(IUnknown *site); |
| @@ -240,8 +257,10 @@ |
| // Our Chrome frame instance and its window. |
| CComPtr<IChromeFrame> chrome_frame_; |
| - CWindow chrome_frame_window_; |
| + // Hides chrome frame during initialization. |
| + EmptyWindow chrome_frame_container_window_; |
| + |
| // Indicates whether CloseDW() is being called on this tool band. |
| bool is_quitting_; |