| Index: athena/extensions/athena_apps_client_base.cc
|
| diff --git a/athena/extensions/chrome/athena_apps_client.cc b/athena/extensions/athena_apps_client_base.cc
|
| similarity index 28%
|
| copy from athena/extensions/chrome/athena_apps_client.cc
|
| copy to athena/extensions/athena_apps_client_base.cc
|
| index cc0f67aa0e1d5226e2cd54e4b2fb43a3f8b979e9..f2d1b4629f8a6e718deeebdb49997d1bb6a604f9 100644
|
| --- a/athena/extensions/chrome/athena_apps_client.cc
|
| +++ b/athena/extensions/athena_apps_client_base.cc
|
| @@ -2,61 +2,22 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "athena/extensions/chrome/athena_apps_client.h"
|
| +#include "athena/extensions/athena_apps_client_base.h"
|
|
|
| #include "athena/activity/public/activity_factory.h"
|
| #include "athena/activity/public/activity_manager.h"
|
| -#include "athena/extensions/chrome/athena_app_delegate.h"
|
| -#include "base/memory/singleton.h"
|
| -#include "chrome/browser/browser_process.h"
|
| -#include "chrome/browser/devtools/devtools_window.h"
|
| -#include "chrome/browser/profiles/profile_manager.h"
|
| -#include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h"
|
| -#include "chrome/common/extensions/features/feature_channel.h"
|
| -#include "extensions/browser/app_window/app_window.h"
|
| +#include "athena/extensions/athena_native_app_window_views.h"
|
| #include "extensions/common/extension.h"
|
|
|
| namespace athena {
|
| -namespace {
|
|
|
| -// A short term hack to get WebView from ChromeNativeAppWindowViews.
|
| -// TODO(oshima): Implement athena's NativeAppWindow.
|
| -class AthenaNativeAppWindowViews : public ChromeNativeAppWindowViews {
|
| - public:
|
| - AthenaNativeAppWindowViews() {}
|
| - virtual ~AthenaNativeAppWindowViews() {}
|
| -
|
| - views::WebView* GetWebView() {
|
| - return web_view();
|
| - }
|
| -
|
| - private:
|
| - DISALLOW_COPY_AND_ASSIGN(AthenaNativeAppWindowViews);
|
| -};
|
| -
|
| -} // namespace
|
| -
|
| -AthenaAppsClient::AthenaAppsClient() {
|
| -}
|
| -
|
| -AthenaAppsClient::~AthenaAppsClient() {
|
| +AthenaAppsClientBase::AthenaAppsClientBase() {
|
| }
|
|
|
| -std::vector<content::BrowserContext*>
|
| -AthenaAppsClient::GetLoadedBrowserContexts() {
|
| - std::vector<Profile*> profiles =
|
| - g_browser_process->profile_manager()->GetLoadedProfiles();
|
| - return std::vector<content::BrowserContext*>(profiles.begin(),
|
| - profiles.end());
|
| +AthenaAppsClientBase::~AthenaAppsClientBase() {
|
| }
|
|
|
| -extensions::AppWindow* AthenaAppsClient::CreateAppWindow(
|
| - content::BrowserContext* context,
|
| - const extensions::Extension* extension) {
|
| - return new extensions::AppWindow(context, new AthenaAppDelegate, extension);
|
| -}
|
| -
|
| -extensions::NativeAppWindow* AthenaAppsClient::CreateNativeAppWindow(
|
| +extensions::NativeAppWindow* AthenaAppsClientBase::CreateNativeAppWindow(
|
| extensions::AppWindow* app_window,
|
| const extensions::AppWindow::CreateParams& params) {
|
| AthenaNativeAppWindowViews* native_window = new AthenaNativeAppWindowViews;
|
| @@ -67,24 +28,12 @@ extensions::NativeAppWindow* AthenaAppsClient::CreateNativeAppWindow(
|
| return native_window;
|
| }
|
|
|
| -void AthenaAppsClient::IncrementKeepAliveCount() {
|
| +void AthenaAppsClientBase::IncrementKeepAliveCount() {
|
| // No need to keep track of KeepAlive count on ChromeOS.
|
| }
|
|
|
| -void AthenaAppsClient::DecrementKeepAliveCount() {
|
| +void AthenaAppsClientBase::DecrementKeepAliveCount() {
|
| // No need to keep track of KeepAlive count on ChromeOS.
|
| }
|
|
|
| -void AthenaAppsClient::OpenDevToolsWindow(content::WebContents* web_contents,
|
| - const base::Closure& callback) {
|
| - // TODO(oshima): Figure out what to do.
|
| - DevToolsWindow* devtools_window = DevToolsWindow::OpenDevToolsWindow(
|
| - web_contents, DevToolsToggleAction::ShowConsole());
|
| - devtools_window->SetLoadCompletedCallback(callback);
|
| -}
|
| -
|
| -bool AthenaAppsClient::IsCurrentChannelOlderThanDev() {
|
| - return extensions::GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV;
|
| -}
|
| -
|
| } // namespace athena
|
|
|