Debugger: UserInterface enhancements.

Add hook to UserInterface to query if Debugger is currently being run
interactively or not. Add corresponding implementations in
{CommandLine,Graphical}UserInterface.
This commit is contained in:
Rene Gollent 2014-06-15 16:38:51 -04:00
parent 778ef3f92b
commit bbf320ecfe
5 changed files with 22 additions and 0 deletions

View File

@ -53,6 +53,8 @@ public:
// shut down the UI *now* -- no more user
// feedback
virtual bool IsInteractive() const = 0;
virtual status_t LoadSettings(const TeamUiSettings* settings)
= 0;
virtual status_t SaveSettings(TeamUiSettings*& settings)

View File

@ -171,6 +171,15 @@ CommandLineUserInterface::Terminate()
}
bool
CommandLineUserInterface::IsInteractive() const
{
// if we were invoked solely for the purpose of saving a crash report,
// then we're not taking user input into account.
return !fSaveReport;
}
status_t
CommandLineUserInterface::LoadSettings(const TeamUiSettings* settings)
{

View File

@ -34,6 +34,8 @@ public:
// shut down the UI *now* -- no more user
// feedback
virtual bool IsInteractive() const;
virtual status_t LoadSettings(const TeamUiSettings* settings);
virtual status_t SaveSettings(TeamUiSettings*& settings) const;

View File

@ -191,6 +191,13 @@ GraphicalUserInterface::Terminate()
}
bool
GraphicalUserInterface::IsInteractive() const
{
return true;
}
status_t
GraphicalUserInterface::LoadSettings(const TeamUiSettings* settings)
{

View File

@ -30,6 +30,8 @@ public:
// shut down the UI *now* -- no more user
// feedback
virtual bool IsInteractive() const;
virtual status_t LoadSettings(const TeamUiSettings* settings);
virtual status_t SaveSettings(TeamUiSettings*& settings) const;