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_VIEWS_FRAME_BROWSER_FRAME_WIN_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_WIN_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_WIN_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 virtual void OnScreenReaderDetected() OVERRIDE; | 54 virtual void OnScreenReaderDetected() OVERRIDE; |
55 virtual bool ShouldUseNativeFrame() const OVERRIDE; | 55 virtual bool ShouldUseNativeFrame() const OVERRIDE; |
56 | 56 |
57 // Overridden from NativeBrowserFrame: | 57 // Overridden from NativeBrowserFrame: |
58 virtual views::NativeWidget* AsNativeWidget() OVERRIDE; | 58 virtual views::NativeWidget* AsNativeWidget() OVERRIDE; |
59 virtual const views::NativeWidget* AsNativeWidget() const OVERRIDE; | 59 virtual const views::NativeWidget* AsNativeWidget() const OVERRIDE; |
60 virtual void InitSystemContextMenu() OVERRIDE; | 60 virtual void InitSystemContextMenu() OVERRIDE; |
61 virtual int GetMinimizeButtonOffset() const OVERRIDE; | 61 virtual int GetMinimizeButtonOffset() const OVERRIDE; |
62 virtual void TabStripDisplayModeChanged() OVERRIDE; | 62 virtual void TabStripDisplayModeChanged() OVERRIDE; |
63 | 63 |
| 64 // Overridden from WindowImpl: |
| 65 virtual LRESULT OnWndProc(UINT message, |
| 66 WPARAM w_param, |
| 67 LPARAM l_param) OVERRIDE; |
| 68 |
64 private: | 69 private: |
65 // Updates the DWM with the frame bounds. | 70 // Updates the DWM with the frame bounds. |
66 void UpdateDWMFrame(); | 71 void UpdateDWMFrame(); |
67 | 72 |
68 // Builds the correct menu for when we have minimal chrome. | 73 // Builds the correct menu for when we have minimal chrome. |
69 void BuildSystemMenuForBrowserWindow(); | 74 void BuildSystemMenuForBrowserWindow(); |
70 void BuildSystemMenuForAppOrPopupWindow(); | 75 void BuildSystemMenuForAppOrPopupWindow(); |
71 | 76 |
72 // Adds optional debug items for frame type toggling. | 77 // Adds optional debug items for frame type toggling. |
73 void AddFrameToggleItems(); | 78 void AddFrameToggleItems(); |
74 | 79 |
| 80 // Handles metro navigation search requests. |
| 81 void HandleMetroRequest(WPARAM w_param, LPARAM l_param); |
| 82 |
75 // The BrowserView is our ClientView. This is a pointer to it. | 83 // The BrowserView is our ClientView. This is a pointer to it. |
76 BrowserView* browser_view_; | 84 BrowserView* browser_view_; |
77 | 85 |
78 BrowserFrame* browser_frame_; | 86 BrowserFrame* browser_frame_; |
79 | 87 |
80 // The additional items we insert into the system menu. | 88 // The additional items we insert into the system menu. |
81 scoped_ptr<SystemMenuModelDelegate> system_menu_delegate_; | 89 scoped_ptr<SystemMenuModelDelegate> system_menu_delegate_; |
82 scoped_ptr<SystemMenuModel> system_menu_contents_; | 90 scoped_ptr<SystemMenuModel> system_menu_contents_; |
83 scoped_ptr<ZoomMenuModel> zoom_menu_contents_; | 91 scoped_ptr<ZoomMenuModel> zoom_menu_contents_; |
84 scoped_ptr<EncodingMenuModel> encoding_menu_contents_; | 92 scoped_ptr<EncodingMenuModel> encoding_menu_contents_; |
85 // The wrapped system menu itself. | 93 // The wrapped system menu itself. |
86 scoped_ptr<views::NativeMenuWin> system_menu_; | 94 scoped_ptr<views::NativeMenuWin> system_menu_; |
87 | 95 |
88 DISALLOW_COPY_AND_ASSIGN(BrowserFrameWin); | 96 DISALLOW_COPY_AND_ASSIGN(BrowserFrameWin); |
89 }; | 97 }; |
90 | 98 |
91 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_WIN_H_ | 99 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_WIN_H_ |
OLD | NEW |