Roll src/third_party/WebKit bf18a82:a9cee16 (svn 185297:185304)
[chromium-blink-merge.git] / athena / extensions / chrome / athena_chrome_app_window_client.cc
blob42da0b086075c91a082075cbac581a022328a672
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "athena/extensions/chrome/athena_chrome_app_window_client.h"
7 #include "athena/extensions/chrome/athena_chrome_app_delegate.h"
8 #include "chrome/browser/devtools/devtools_window.h"
9 #include "chrome/common/extensions/features/feature_channel.h"
10 #include "extensions/browser/app_window/app_window.h"
12 namespace athena {
14 AthenaChromeAppWindowClient::AthenaChromeAppWindowClient() {
17 AthenaChromeAppWindowClient::~AthenaChromeAppWindowClient() {
20 extensions::AppWindow* AthenaChromeAppWindowClient::CreateAppWindow(
21 content::BrowserContext* context,
22 const extensions::Extension* extension) {
23 return new extensions::AppWindow(
24 context, new AthenaChromeAppDelegate, extension);
27 void AthenaChromeAppWindowClient::OpenDevToolsWindow(
28 content::WebContents* web_contents,
29 const base::Closure& callback) {
30 // TODO(oshima): Figure out what to do.
31 DevToolsWindow* devtools_window = DevToolsWindow::OpenDevToolsWindow(
32 web_contents, DevToolsToggleAction::ShowConsole());
33 devtools_window->SetLoadCompletedCallback(callback);
36 bool AthenaChromeAppWindowClient::IsCurrentChannelOlderThanDev() {
37 return extensions::GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV;
40 } // namespace athena