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 #include "chrome/browser/ui/views/panels/panel_view.h" | 5 #include "chrome/browser/ui/views/panels/panel_view.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 (*accelerators)[accelerator] = kPanelAcceleratorMap[i].command_id; | 94 (*accelerators)[accelerator] = kPanelAcceleratorMap[i].command_id; |
95 } | 95 } |
96 } | 96 } |
97 return *accelerators; | 97 return *accelerators; |
98 } | 98 } |
99 | 99 |
100 // NativePanelTesting implementation. | 100 // NativePanelTesting implementation. |
101 class NativePanelTestingViews : public NativePanelTesting { | 101 class NativePanelTestingViews : public NativePanelTesting { |
102 public: | 102 public: |
103 explicit NativePanelTestingViews(PanelView* panel_view); | 103 explicit NativePanelTestingViews(PanelView* panel_view); |
104 virtual ~NativePanelTestingViews(); | 104 ~NativePanelTestingViews() override; |
105 | 105 |
106 private: | 106 private: |
107 virtual void PressLeftMouseButtonTitlebar( | 107 void PressLeftMouseButtonTitlebar(const gfx::Point& mouse_location, |
108 const gfx::Point& mouse_location, panel::ClickModifier modifier) override; | 108 panel::ClickModifier modifier) override; |
109 virtual void ReleaseMouseButtonTitlebar( | 109 void ReleaseMouseButtonTitlebar(panel::ClickModifier modifier) override; |
110 panel::ClickModifier modifier) override; | 110 void DragTitlebar(const gfx::Point& mouse_location) override; |
111 virtual void DragTitlebar(const gfx::Point& mouse_location) override; | 111 void CancelDragTitlebar() override; |
112 virtual void CancelDragTitlebar() override; | 112 void FinishDragTitlebar() override; |
113 virtual void FinishDragTitlebar() override; | 113 bool VerifyDrawingAttention() const override; |
114 virtual bool VerifyDrawingAttention() const override; | 114 bool VerifyActiveState(bool is_active) override; |
115 virtual bool VerifyActiveState(bool is_active) override; | 115 bool VerifyAppIcon() const override; |
116 virtual bool VerifyAppIcon() const override; | 116 bool VerifySystemMinimizeState() const override; |
117 virtual bool VerifySystemMinimizeState() const override; | 117 bool IsWindowVisible() const override; |
118 virtual bool IsWindowVisible() const override; | 118 bool IsWindowSizeKnown() const override; |
119 virtual bool IsWindowSizeKnown() const override; | 119 bool IsAnimatingBounds() const override; |
120 virtual bool IsAnimatingBounds() const override; | 120 bool IsButtonVisible(panel::TitlebarButtonType button_type) const override; |
121 virtual bool IsButtonVisible( | 121 panel::CornerStyle GetWindowCornerStyle() const override; |
122 panel::TitlebarButtonType button_type) const override; | 122 bool EnsureApplicationRunOnForeground() override; |
123 virtual panel::CornerStyle GetWindowCornerStyle() const override; | |
124 virtual bool EnsureApplicationRunOnForeground() override; | |
125 | 123 |
126 PanelView* panel_view_; | 124 PanelView* panel_view_; |
127 }; | 125 }; |
128 | 126 |
129 NativePanelTestingViews::NativePanelTestingViews(PanelView* panel_view) | 127 NativePanelTestingViews::NativePanelTestingViews(PanelView* panel_view) |
130 : panel_view_(panel_view) { | 128 : panel_view_(panel_view) { |
131 } | 129 } |
132 | 130 |
133 NativePanelTestingViews::~NativePanelTestingViews() { | 131 NativePanelTestingViews::~NativePanelTestingViews() { |
134 } | 132 } |
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 // SWP_FRAMECHANGED flag must be called in order for the cached window data | 1143 // SWP_FRAMECHANGED flag must be called in order for the cached window data |
1146 // to be updated properly. | 1144 // to be updated properly. |
1147 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).a
spx | 1145 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).a
spx |
1148 if (update_frame) { | 1146 if (update_frame) { |
1149 ::SetWindowPos(native_window, NULL, 0, 0, 0, 0, | 1147 ::SetWindowPos(native_window, NULL, 0, 0, 0, 0, |
1150 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | | 1148 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | |
1151 SWP_NOZORDER | SWP_NOACTIVATE); | 1149 SWP_NOZORDER | SWP_NOACTIVATE); |
1152 } | 1150 } |
1153 } | 1151 } |
1154 #endif | 1152 #endif |
OLD | NEW |