2014-10-31 18:17:05 +00:00
|
|
|
// Copyright (c) 2013 GitHub, Inc.
|
2014-04-25 09:49:37 +00:00
|
|
|
// Use of this source code is governed by the MIT license that can be
|
2014-01-02 14:47:54 +00:00
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2014-03-16 00:30:26 +00:00
|
|
|
#include "atom/browser/browser.h"
|
2014-01-02 14:47:54 +00:00
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2014-03-16 00:30:26 +00:00
|
|
|
#include "atom/browser/native_window.h"
|
|
|
|
#include "atom/browser/window_list.h"
|
|
|
|
#include "atom/common/atom_version.h"
|
2014-01-02 14:47:54 +00:00
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
|
|
|
void Browser::Focus() {
|
|
|
|
// Focus on the first visible window.
|
|
|
|
WindowList* list = WindowList::GetInstance();
|
|
|
|
for (WindowList::iterator iter = list->begin(); iter != list->end(); ++iter) {
|
|
|
|
NativeWindow* window = *iter;
|
|
|
|
if (window->IsVisible()) {
|
|
|
|
window->Focus(true);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string Browser::GetExecutableFileVersion() const {
|
|
|
|
return ATOM_VERSION_STRING;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string Browser::GetExecutableFileProductName() const {
|
|
|
|
return "Atom-Shell";
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace atom
|