Merge lp:~3v1n0/unity/shield-notify-grabs into lp:unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
Merged at revision: 3878
Proposed branch: lp:~3v1n0/unity/shield-notify-grabs
Merge into: lp:unity
Diff against target: 417 lines (+117/-19)
15 files modified
UnityCore/DBusIndicators.cpp (+11/-0)
UnityCore/DBusIndicators.h (+1/-0)
UnityCore/Indicators.h (+1/-0)
lockscreen/LockScreenAbstractShield.h (+3/-0)
lockscreen/LockScreenController.cpp (+33/-11)
lockscreen/LockScreenController.h (+2/-2)
lockscreen/LockScreenPanel.cpp (+28/-1)
lockscreen/LockScreenShield.cpp (+9/-5)
lockscreen/LockScreenShield.h (+1/-0)
plugins/unityshell/src/unityshell.cpp (+1/-0)
services/panel-main.c (+8/-0)
services/panel-service.c (+15/-0)
services/panel-service.h (+2/-0)
tests/mock_indicators.h (+1/-0)
tests/test_lockscreen_controller.cpp (+1/-0)
To merge this branch: bzr merge lp:~3v1n0/unity/shield-notify-grabs
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+235328@code.launchpad.net

Commit message

LockScreenController: wait the primary shield to get the grab before setting the session locked

If that fails (and if the grab has never been gained during this locking session),
it's up to the Controller to decide whether the lock request has to be ignored.
So, if the primary shield fails to grab, before that the screen has ever been locked,
then we have to give up. Otherwise if it fails (but we were already locked), it's safe
to assume that this failure is due to the menus that are currently controlling the grab.

Also setup the primary shield signal connections in a shared place and use a
connection::Manager to keep track of them.

Description of the change

Correctly handle the resolution changes when a menu is open in lockscreen

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrea Azzarone (azzar1) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'UnityCore/DBusIndicators.cpp'
--- UnityCore/DBusIndicators.cpp 2014-03-05 17:19:50 +0000
+++ UnityCore/DBusIndicators.cpp 2014-09-20 02:04:20 +0000
@@ -55,6 +55,7 @@
55 void Sync(GVariant* args, glib::Error const&);55 void Sync(GVariant* args, glib::Error const&);
56 void SyncGeometries(std::string const& name, EntryLocationMap const& locations);56 void SyncGeometries(std::string const& name, EntryLocationMap const& locations);
57 void ShowEntriesDropdown(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y);57 void ShowEntriesDropdown(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y);
58 void CloseActiveEntry();
5859
59 void OnConnected();60 void OnConnected();
60 void OnDisconnected();61 void OnDisconnected();
@@ -313,6 +314,11 @@
313 gproxy_.Call("ScrollEntry", g_variant_new("(si)", entry_id.c_str(), delta));314 gproxy_.Call("ScrollEntry", g_variant_new("(si)", entry_id.c_str(), delta));
314}315}
315316
317void DBusIndicators::Impl::CloseActiveEntry()
318{
319 gproxy_.Call("CloseActiveEntry");
320}
321
316void DBusIndicators::Impl::Sync(GVariant* args, glib::Error const& error)322void DBusIndicators::Impl::Sync(GVariant* args, glib::Error const& error)
317{323{
318 if (!args || error)324 if (!args || error)
@@ -489,6 +495,11 @@
489 pimpl->ShowEntriesDropdown(entries, selected, xid, x, y);495 pimpl->ShowEntriesDropdown(entries, selected, xid, x, y);
490}496}
491497
498void DBusIndicators::CloseActiveEntry()
499{
500 pimpl->CloseActiveEntry();
501}
502
492void DBusIndicators::OnEntryScroll(std::string const& entry_id, int delta)503void DBusIndicators::OnEntryScroll(std::string const& entry_id, int delta)
493{504{
494 pimpl->OnEntryScroll(entry_id, delta);505 pimpl->OnEntryScroll(entry_id, delta);
495506
=== modified file 'UnityCore/DBusIndicators.h'
--- UnityCore/DBusIndicators.h 2014-03-04 13:14:12 +0000
+++ UnityCore/DBusIndicators.h 2014-09-20 02:04:20 +0000
@@ -40,6 +40,7 @@
40 std::vector<std::string> const& IconPaths() const;40 std::vector<std::string> const& IconPaths() const;
41 void ShowEntriesDropdown(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y);41 void ShowEntriesDropdown(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y);
42 void SyncGeometries(std::string const& name, EntryLocationMap const& locations);42 void SyncGeometries(std::string const& name, EntryLocationMap const& locations);
43 void CloseActiveEntry();
4344
44protected:45protected:
45 virtual void OnEntryScroll(std::string const& entry_id, int delta);46 virtual void OnEntryScroll(std::string const& entry_id, int delta);
4647
=== modified file 'UnityCore/Indicators.h'
--- UnityCore/Indicators.h 2014-02-28 05:16:10 +0000
+++ UnityCore/Indicators.h 2014-09-20 02:04:20 +0000
@@ -44,6 +44,7 @@
4444
45 virtual void SyncGeometries(std::string const& panel, EntryLocationMap const&) = 0;45 virtual void SyncGeometries(std::string const& panel, EntryLocationMap const&) = 0;
46 virtual void ShowEntriesDropdown(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y) = 0;46 virtual void ShowEntriesDropdown(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y) = 0;
47 virtual void CloseActiveEntry() = 0;
4748
48 // Signals49 // Signals
49 sigc::signal<void, Indicator::Ptr const&> on_object_added;50 sigc::signal<void, Indicator::Ptr const&> on_object_added;
5051
=== modified file 'lockscreen/LockScreenAbstractShield.h'
--- lockscreen/LockScreenAbstractShield.h 2014-07-24 18:51:56 +0000
+++ lockscreen/LockScreenAbstractShield.h 2014-09-20 02:04:20 +0000
@@ -57,9 +57,12 @@
57 nux::Property<double> scale;57 nux::Property<double> scale;
5858
59 using MockableBaseWindow::RemoveLayout;59 using MockableBaseWindow::RemoveLayout;
60 virtual bool HasGrab() const = 0;
60 virtual bool IsIndicatorOpen() const = 0;61 virtual bool IsIndicatorOpen() const = 0;
61 virtual void ActivatePanel() = 0;62 virtual void ActivatePanel() = 0;
6263
64 sigc::signal<void> grabbed;
65 sigc::signal<void> grab_failed;
63 sigc::signal<void, int, int> grab_motion;66 sigc::signal<void, int, int> grab_motion;
64 sigc::signal<void, unsigned long, unsigned long> grab_key;67 sigc::signal<void, unsigned long, unsigned long> grab_key;
6568
6669
=== modified file 'lockscreen/LockScreenController.cpp'
--- lockscreen/LockScreenController.cpp 2014-08-27 22:12:56 +0000
+++ lockscreen/LockScreenController.cpp 2014-09-20 02:04:20 +0000
@@ -100,8 +100,7 @@
100 fade_animator_.finished.connect([this] {100 fade_animator_.finished.connect([this] {
101 if (animation::GetDirection(fade_animator_) == animation::Direction::BACKWARD)101 if (animation::GetDirection(fade_animator_) == animation::Direction::BACKWARD)
102 {102 {
103 motion_connection_->disconnect();103 primary_shield_connections_.Clear();
104 key_connection_->disconnect();
105 uscreen_connection_->block();104 uscreen_connection_->block();
106 hidden_window_connection_->block();105 hidden_window_connection_->block();
107 session_manager_->is_locked = false;106 session_manager_->is_locked = false;
@@ -173,10 +172,7 @@
173 primary_shield_ = shield;172 primary_shield_ = shield;
174 shield->primary = true;173 shield->primary = true;
175 nux::GetWindowCompositor().SetAlwaysOnFrontWindow(primary_shield_.GetPointer());174 nux::GetWindowCompositor().SetAlwaysOnFrontWindow(primary_shield_.GetPointer());
176 auto move_cb = sigc::mem_fun(this, &Controller::OnPrimaryShieldMotion);175 SetupPrimaryShieldConnections();
177 motion_connection_ = shield->grab_motion.connect(move_cb);
178 auto key_cb = sigc::hide(sigc::hide(sigc::mem_fun(this, &Controller::ResetPostLockScreenSaver)));
179 key_connection_ = shield->grab_key.connect(key_cb);
180 break;176 break;
181 }177 }
182 }178 }
@@ -184,6 +180,35 @@
184 ResetPostLockScreenSaver();180 ResetPostLockScreenSaver();
185}181}
186182
183void Controller::SetupPrimaryShieldConnections()
184{
185 if (!primary_shield_.IsValid())
186 return;
187
188 primary_shield_connections_.Clear();
189
190 auto move_cb = sigc::mem_fun(this, &Controller::OnPrimaryShieldMotion);
191 primary_shield_connections_.Add(primary_shield_->grab_motion.connect(move_cb));
192
193 auto key_cb = sigc::hide(sigc::hide(sigc::mem_fun(this, &Controller::ResetPostLockScreenSaver)));
194 primary_shield_connections_.Add(primary_shield_->grab_key.connect(key_cb));
195
196 if (!session_manager_->is_locked())
197 {
198 primary_shield_connections_.Add(primary_shield_->grabbed.connect([this] {
199 session_manager_->is_locked = true;
200 }));
201
202 primary_shield_connections_.Add(primary_shield_->grab_failed.connect([this] {
203 if (!session_manager_->is_locked())
204 {
205 LOG_ERROR(logger) << "Impossible to get the grab to lock the screen";
206 session_manager_->unlock_requested.emit();
207 }
208 }));
209 }
210}
211
187void Controller::EnsureShields(std::vector<nux::Geometry> const& monitors)212void Controller::EnsureShields(std::vector<nux::Geometry> const& monitors)
188{213{
189 int num_monitors = monitors.size();214 int num_monitors = monitors.size();
@@ -233,10 +258,7 @@
233258
234 primary_shield_ = shields_[primary];259 primary_shield_ = shields_[primary];
235 primary_shield_->primary = true;260 primary_shield_->primary = true;
236 auto move_cb = sigc::mem_fun(this, &Controller::OnPrimaryShieldMotion);261 SetupPrimaryShieldConnections();
237 motion_connection_ = primary_shield_->grab_motion.connect(move_cb);
238 auto key_cb = sigc::hide(sigc::hide(sigc::mem_fun(this, &Controller::ResetPostLockScreenSaver)));
239 key_connection_ = primary_shield_->grab_key.connect(key_cb);
240}262}
241263
242void Controller::EnsureBlankWindow()264void Controller::EnsureBlankWindow()
@@ -358,7 +380,6 @@
358 HideBlankWindow();380 HideBlankWindow();
359381
360 LockScreen();382 LockScreen();
361 session_manager_->is_locked = true;
362383
363 if (prompt_activation_)384 if (prompt_activation_)
364 {385 {
@@ -444,6 +465,7 @@
444 shield->PushToFront();465 shield->PushToFront();
445 });466 });
446467
468 session_manager_->is_locked = primary_shield_->HasGrab();
447 nux::GetWindowCompositor().SetAlwaysOnFrontWindow(primary_shield_.GetPointer());469 nux::GetWindowCompositor().SetAlwaysOnFrontWindow(primary_shield_.GetPointer());
448 animation::StartOrReverse(fade_animator_, animation::Direction::FORWARD);470 animation::StartOrReverse(fade_animator_, animation::Direction::FORWARD);
449}471}
450472
=== modified file 'lockscreen/LockScreenController.h'
--- lockscreen/LockScreenController.h 2014-08-25 20:46:31 +0000
+++ lockscreen/LockScreenController.h 2014-09-20 02:04:20 +0000
@@ -66,6 +66,7 @@
66 void BlankWindowGrabEnable(bool grab);66 void BlankWindowGrabEnable(bool grab);
67 void SimulateActivity();67 void SimulateActivity();
68 void ResetPostLockScreenSaver();68 void ResetPostLockScreenSaver();
69 void SetupPrimaryShieldConnections();
69 void ActivatePanel();70 void ActivatePanel();
7071
71 void OnLockRequested(bool prompt);72 void OnLockRequested(bool prompt);
@@ -96,8 +97,7 @@
96 connection::Wrapper uscreen_connection_;97 connection::Wrapper uscreen_connection_;
97 connection::Wrapper suspend_connection_;98 connection::Wrapper suspend_connection_;
98 connection::Wrapper hidden_window_connection_;99 connection::Wrapper hidden_window_connection_;
99 connection::Wrapper motion_connection_;100 connection::Manager primary_shield_connections_;
100 connection::Wrapper key_connection_;
101101
102 glib::Source::UniquePtr lockscreen_timeout_;102 glib::Source::UniquePtr lockscreen_timeout_;
103 glib::Source::UniquePtr lockscreen_delay_timeout_;103 glib::Source::UniquePtr lockscreen_delay_timeout_;
104104
=== modified file 'lockscreen/LockScreenPanel.cpp'
--- lockscreen/LockScreenPanel.cpp 2014-07-22 01:05:07 +0000
+++ lockscreen/LockScreenPanel.cpp 2014-09-20 02:04:20 +0000
@@ -110,12 +110,39 @@
110 return;110 return;
111111
112 indicators_view_->AddIndicator(indicator);112 indicators_view_->AddIndicator(indicator);
113
114 if (!active)
115 {
116 for (auto const& entry : indicator->GetEntries())
117 {
118 if (entry->active())
119 {
120 active = true;
121 indicators_view_->ActivateEntry(entry->id());
122 OnEntryActivated(GetPanelName(), entry->id(), entry->geometry());
123 break;
124 }
125 }
126 }
127
113 QueueRelayout();128 QueueRelayout();
114 QueueDraw();129 QueueDraw();
115}130}
116131
117void Panel::RemoveIndicator(indicator::Indicator::Ptr const& indicator)132void Panel::RemoveIndicator(indicator::Indicator::Ptr const& indicator)
118{133{
134 if (active)
135 {
136 for (auto const& entry : indicator->GetEntries())
137 {
138 if (entry->active())
139 {
140 active = false;
141 break;
142 }
143 }
144 }
145
119 indicators_view_->RemoveIndicator(indicator);146 indicators_view_->RemoveIndicator(indicator);
120 QueueRelayout();147 QueueRelayout();
121 QueueDraw();148 QueueDraw();
@@ -123,7 +150,7 @@
123150
124std::string Panel::GetPanelName() const151std::string Panel::GetPanelName() const
125{152{
126 return "LockScreenPanel" + std::to_string(monitor);153 return "LockScreenPanel";
127}154}
128155
129void Panel::OnIndicatorViewUpdated()156void Panel::OnIndicatorViewUpdated()
130157
=== modified file 'lockscreen/LockScreenShield.cpp'
--- lockscreen/LockScreenShield.cpp 2014-08-27 22:12:56 +0000
+++ lockscreen/LockScreenShield.cpp 2014-09-20 02:04:20 +0000
@@ -19,7 +19,6 @@
1919
20#include "LockScreenShield.h"20#include "LockScreenShield.h"
2121
22#include <NuxCore/Logger.h>
23#include <Nux/VLayout.h>22#include <Nux/VLayout.h>
24#include <Nux/HLayout.h>23#include <Nux/HLayout.h>
25#include <Nux/PaintLayer.h>24#include <Nux/PaintLayer.h>
@@ -39,8 +38,7 @@
39{38{
40namespace39namespace
41{40{
42DECLARE_LOGGER(logger, "unity.lockscreen.shield");41const unsigned MAX_GRAB_WAIT = 100;
43const unsigned MAX_GRAB_WAIT = 50;
44}42}
4543
46Shield::Shield(session::Manager::Ptr const& session_manager,44Shield::Shield(session::Manager::Ptr const& session_manager,
@@ -123,6 +121,7 @@
123 {121 {
124 regrab_conn_->disconnect();122 regrab_conn_->disconnect();
125 regrab_timeout_.reset();123 regrab_timeout_.reset();
124 grabbed.emit();
126 }125 }
127 else126 else
128 {127 {
@@ -132,14 +131,19 @@
132 if (cancel_on_failure)131 if (cancel_on_failure)
133 {132 {
134 regrab_timeout_.reset(new glib::Timeout(MAX_GRAB_WAIT, [this] {133 regrab_timeout_.reset(new glib::Timeout(MAX_GRAB_WAIT, [this] {
135 LOG_ERROR(logger) << "Impossible to get the grab to lock the screen";134 grab_failed.emit();
136 session_manager_->unlock_requested.emit();
137 return false;135 return false;
138 }));136 }));
139 }137 }
140 }138 }
141}139}
142140
141bool Shield::HasGrab() const
142{
143 auto& wc = nux::GetWindowCompositor();
144 return (wc.GetPointerGrabArea() == this && wc.GetKeyboardGrabArea() == this);
145}
146
143void Shield::ShowPrimaryView()147void Shield::ShowPrimaryView()
144{148{
145 if (primary_layout_)149 if (primary_layout_)
146150
=== modified file 'lockscreen/LockScreenShield.h'
--- lockscreen/LockScreenShield.h 2014-08-27 22:12:56 +0000
+++ lockscreen/LockScreenShield.h 2014-09-20 02:04:20 +0000
@@ -44,6 +44,7 @@
44 nux::ObjectPtr<UserPromptView> const&,44 nux::ObjectPtr<UserPromptView> const&,
45 int monitor, bool is_primary);45 int monitor, bool is_primary);
4646
47 bool HasGrab() const override;
47 bool IsIndicatorOpen() const override;48 bool IsIndicatorOpen() const override;
48 void ActivatePanel() override;49 void ActivatePanel() override;
4950
5051
=== modified file 'plugins/unityshell/src/unityshell.cpp'
--- plugins/unityshell/src/unityshell.cpp 2014-09-04 22:12:01 +0000
+++ plugins/unityshell/src/unityshell.cpp 2014-09-20 02:04:20 +0000
@@ -3784,6 +3784,7 @@
3784 if (hud_controller_->IsVisible())3784 if (hud_controller_->IsVisible())
3785 hud_controller_->HideHud();3785 hud_controller_->HideHud();
37863786
3787 menus_->Indicators()->CloseActiveEntry();
3787 launcher_controller_->ClearTooltips();3788 launcher_controller_->ClearTooltips();
37883789
3789 if (launcher_controller_->KeyNavIsActive())3790 if (launcher_controller_->KeyNavIsActive())
37903791
=== modified file 'services/panel-main.c'
--- services/panel-main.c 2014-03-05 17:19:50 +0000
+++ services/panel-main.c 2014-09-20 02:04:20 +0000
@@ -82,6 +82,9 @@
82 " <arg type='i' name='delta' direction='in'/>"82 " <arg type='i' name='delta' direction='in'/>"
83 " </method>"83 " </method>"
84 ""84 ""
85 ""
86 " <method name='CloseActiveEntry' />"
87 ""
85 " <signal name='EntryActivated'>"88 " <signal name='EntryActivated'>"
86 " <arg type='s' name='panel_id' />"89 " <arg type='s' name='panel_id' />"
87 " <arg type='s' name='entry_id' />"90 " <arg type='s' name='entry_id' />"
@@ -254,6 +257,11 @@
254 g_dbus_method_invocation_return_value (invocation, NULL);257 g_dbus_method_invocation_return_value (invocation, NULL);
255 g_free(entry_id);258 g_free(entry_id);
256 }259 }
260 else if (g_strcmp0 (method_name, "CloseActiveEntry") == 0)
261 {
262 panel_service_close_active_entry (service);
263 g_dbus_method_invocation_return_value (invocation, NULL);
264 }
257}265}
258266
259static void267static void
260268
=== modified file 'services/panel-service.c'
--- services/panel-service.c 2014-08-11 12:29:07 +0000
+++ services/panel-service.c 2014-09-20 02:04:20 +0000
@@ -2421,6 +2421,8 @@
2421 IndicatorObject *object;2421 IndicatorObject *object;
2422 IndicatorObjectEntry *entry;2422 IndicatorObjectEntry *entry;
24232423
2424 g_return_if_fail (PANEL_IS_SERVICE (self));
2425
2424 entry = get_indicator_entry_by_id (self, entry_id);2426 entry = get_indicator_entry_by_id (self, entry_id);
2425 g_return_if_fail (entry);2427 g_return_if_fail (entry);
24262428
@@ -2437,6 +2439,8 @@
2437 IndicatorObject *object;2439 IndicatorObject *object;
2438 IndicatorObjectEntry *entry;2440 IndicatorObjectEntry *entry;
24392441
2442 g_return_if_fail (PANEL_IS_SERVICE (self));
2443
2440 entry = get_indicator_entry_by_id (self, entry_id);2444 entry = get_indicator_entry_by_id (self, entry_id);
2441 g_return_if_fail (entry);2445 g_return_if_fail (entry);
24422446
@@ -2465,3 +2469,14 @@
2465 entry, 1, direction);2469 entry, 1, direction);
2466 }2470 }
2467}2471}
2472
2473void
2474panel_service_close_active_entry (PanelService *self)
2475{
2476 g_return_if_fail (PANEL_IS_SERVICE (self));
2477
2478 if (GTK_IS_MENU (self->priv->last_menu))
2479 {
2480 gtk_menu_popdown (GTK_MENU (self->priv->last_menu));
2481 }
2482}
24682483
=== modified file 'services/panel-service.h'
--- services/panel-service.h 2014-02-06 12:02:48 +0000
+++ services/panel-service.h 2014-09-20 02:04:20 +0000
@@ -122,6 +122,8 @@
122 const gchar *entry_id,122 const gchar *entry_id,
123 gint32 delta);123 gint32 delta);
124124
125void panel_service_close_active_entry (PanelService *self);
126
125G_END_DECLS127G_END_DECLS
126128
127#endif /* _PANEL_SERVICE_H_ */129#endif /* _PANEL_SERVICE_H_ */
128130
=== modified file 'tests/mock_indicators.h'
--- tests/mock_indicators.h 2014-02-28 05:16:10 +0000
+++ tests/mock_indicators.h 2014-09-20 02:04:20 +0000
@@ -36,6 +36,7 @@
36 // Implementing Indicators virtual functions36 // Implementing Indicators virtual functions
37 MOCK_METHOD2(SyncGeometries, void(std::string const&, EntryLocationMap const&));37 MOCK_METHOD2(SyncGeometries, void(std::string const&, EntryLocationMap const&));
38 MOCK_METHOD5(ShowEntriesDropdown, void(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y));38 MOCK_METHOD5(ShowEntriesDropdown, void(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y));
39 MOCK_METHOD0(CloseActiveEntry, void());
39 MOCK_CONST_METHOD0(IconPaths, std::vector<std::string> const&());40 MOCK_CONST_METHOD0(IconPaths, std::vector<std::string> const&());
40 MOCK_METHOD2(OnEntryScroll, void(std::string const&, int delta));41 MOCK_METHOD2(OnEntryScroll, void(std::string const&, int delta));
41 MOCK_METHOD5(OnEntryShowMenu, void(std::string const&, unsigned xid, int x, int y, unsigned button));42 MOCK_METHOD5(OnEntryShowMenu, void(std::string const&, unsigned xid, int x, int y, unsigned button));
4243
=== modified file 'tests/test_lockscreen_controller.cpp'
--- tests/test_lockscreen_controller.cpp 2014-07-11 17:45:39 +0000
+++ tests/test_lockscreen_controller.cpp 2014-09-20 02:04:20 +0000
@@ -59,6 +59,7 @@
5959
60 MOCK_CONST_METHOD0(IsIndicatorOpen, bool());60 MOCK_CONST_METHOD0(IsIndicatorOpen, bool());
61 MOCK_METHOD0(ActivatePanel, void());61 MOCK_METHOD0(ActivatePanel, void());
62 MOCK_CONST_METHOD0(HasGrab, bool());
62};63};
6364
64struct ShieldFactoryMock : ShieldFactoryInterface65struct ShieldFactoryMock : ShieldFactoryInterface