| 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 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/ui/views/frame/browser_frame.h" | 10 #include "chrome/browser/ui/views/frame/browser_frame.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // Explicitly sets how windows are shown. Use a value of -1 to give the | 40 // Explicitly sets how windows are shown. Use a value of -1 to give the |
| 41 // default behavior. This is used during testing and not generally useful | 41 // default behavior. This is used during testing and not generally useful |
| 42 // otherwise. | 42 // otherwise. |
| 43 static void SetShowState(int state); | 43 static void SetShowState(int state); |
| 44 | 44 |
| 45 protected: | 45 protected: |
| 46 // Overridden from views::NativeWidgetWin: | 46 // Overridden from views::NativeWidgetWin: |
| 47 virtual int GetInitialShowState() const OVERRIDE; | 47 virtual int GetInitialShowState() const OVERRIDE; |
| 48 virtual bool GetClientAreaInsets(gfx::Insets* insets) const OVERRIDE; | 48 virtual bool GetClientAreaInsets(gfx::Insets* insets) const OVERRIDE; |
| 49 virtual void UpdateFrameAfterFrameChange() OVERRIDE; | 49 virtual void UpdateFrameAfterFrameChange() OVERRIDE; |
| 50 virtual void OnEndSession(BOOL ending, UINT logoff) OVERRIDE; | 50 virtual void HandleEndSession() OVERRIDE; |
| 51 virtual void OnInitMenuPopup(HMENU menu, | 51 virtual void HandleInitMenuPopup() OVERRIDE; |
| 52 UINT position, | 52 virtual void HandleVisibilityChanged(bool visible) OVERRIDE; |
| 53 BOOL is_system_menu) OVERRIDE; | 53 virtual void HandleFrameChanged() OVERRIDE; |
| 54 virtual void OnWindowPosChanged(WINDOWPOS* window_pos) OVERRIDE; | 54 virtual bool HandleMSG(UINT message, |
| 55 WPARAM w_param, |
| 56 LPARAM l_param, |
| 57 LRESULT* result) OVERRIDE; |
| 58 |
| 55 virtual void OnScreenReaderDetected() OVERRIDE; | 59 virtual void OnScreenReaderDetected() OVERRIDE; |
| 56 virtual bool ShouldUseNativeFrame() const OVERRIDE; | 60 virtual bool ShouldUseNativeFrame() const OVERRIDE; |
| 57 virtual void Show() OVERRIDE; | 61 virtual void Show() OVERRIDE; |
| 58 virtual void ShowMaximizedWithBounds( | 62 virtual void ShowMaximizedWithBounds( |
| 59 const gfx::Rect& restored_bounds) OVERRIDE; | 63 const gfx::Rect& restored_bounds) OVERRIDE; |
| 60 virtual void ShowWithWindowState(ui::WindowShowState show_state) OVERRIDE; | 64 virtual void ShowWithWindowState(ui::WindowShowState show_state) OVERRIDE; |
| 61 virtual void Close() OVERRIDE; | 65 virtual void Close() OVERRIDE; |
| 62 virtual void OnActivate(UINT action, BOOL minimized, HWND window) OVERRIDE; | 66 virtual void HandleActivationChanged(bool active) OVERRIDE; |
| 63 virtual void FrameTypeChanged() OVERRIDE; | 67 virtual void FrameTypeChanged() OVERRIDE; |
| 64 virtual void SetFullscreen(bool fullscreen) OVERRIDE; | 68 virtual void SetFullscreen(bool fullscreen) OVERRIDE; |
| 65 | 69 |
| 66 // Overridden from NativeBrowserFrame: | 70 // Overridden from NativeBrowserFrame: |
| 67 virtual views::NativeWidget* AsNativeWidget() OVERRIDE; | 71 virtual views::NativeWidget* AsNativeWidget() OVERRIDE; |
| 68 virtual const views::NativeWidget* AsNativeWidget() const OVERRIDE; | 72 virtual const views::NativeWidget* AsNativeWidget() const OVERRIDE; |
| 69 virtual void InitSystemContextMenu() OVERRIDE; | 73 virtual void InitSystemContextMenu() OVERRIDE; |
| 70 virtual int GetMinimizeButtonOffset() const OVERRIDE; | 74 virtual int GetMinimizeButtonOffset() const OVERRIDE; |
| 71 virtual void TabStripDisplayModeChanged() OVERRIDE; | 75 virtual void TabStripDisplayModeChanged() OVERRIDE; |
| 72 | 76 |
| 73 // Overriden from views::ImageButton override: | 77 // Overriden from views::ImageButton override: |
| 74 virtual void ButtonPressed(views::Button* sender, | 78 virtual void ButtonPressed(views::Button* sender, |
| 75 const ui::Event& event) OVERRIDE; | 79 const ui::Event& event) OVERRIDE; |
| 76 | 80 |
| 77 // Overridden from WindowImpl: | |
| 78 virtual LRESULT OnWndProc(UINT message, | |
| 79 WPARAM w_param, | |
| 80 LPARAM l_param) OVERRIDE; | |
| 81 | |
| 82 private: | 81 private: |
| 83 // Updates the DWM with the frame bounds. | 82 // Updates the DWM with the frame bounds. |
| 84 void UpdateDWMFrame(); | 83 void UpdateDWMFrame(); |
| 85 | 84 |
| 86 // Builds the correct menu for when we have minimal chrome. | 85 // Builds the correct menu for when we have minimal chrome. |
| 87 void BuildSystemMenuForBrowserWindow(); | 86 void BuildSystemMenuForBrowserWindow(); |
| 88 void BuildSystemMenuForAppOrPopupWindow(); | 87 void BuildSystemMenuForAppOrPopupWindow(); |
| 89 | 88 |
| 90 // Adds optional debug items for frame type toggling. | 89 // Adds optional debug items for frame type toggling. |
| 91 void AddFrameToggleItems(); | 90 void AddFrameToggleItems(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 121 // The wrapped system menu itself. | 120 // The wrapped system menu itself. |
| 122 scoped_ptr<views::NativeMenuWin> system_menu_; | 121 scoped_ptr<views::NativeMenuWin> system_menu_; |
| 123 | 122 |
| 124 // See CacheMinimizeButtonDelta() for details about this member. | 123 // See CacheMinimizeButtonDelta() for details about this member. |
| 125 int cached_minimize_button_x_delta_; | 124 int cached_minimize_button_x_delta_; |
| 126 | 125 |
| 127 DISALLOW_COPY_AND_ASSIGN(BrowserFrameWin); | 126 DISALLOW_COPY_AND_ASSIGN(BrowserFrameWin); |
| 128 }; | 127 }; |
| 129 | 128 |
| 130 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_WIN_H_ | 129 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_WIN_H_ |
| OLD | NEW |