Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Side by Side Diff: athena/extensions/chrome/athena_chrome_apps_client.cc

Issue 583583008: Rename AppsClient -> AppWindowClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix a bit more naming Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #include "athena/extensions/chrome/athena_chrome_apps_client.h"
6
7 #include "athena/extensions/chrome/athena_chrome_app_delegate.h"
8 #include "base/memory/singleton.h"
9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/devtools/devtools_window.h"
11 #include "chrome/browser/profiles/profile_manager.h"
12 #include "chrome/common/extensions/features/feature_channel.h"
13 #include "extensions/browser/app_window/app_window.h"
14
15 namespace athena {
16
17 AthenaChromeAppsClient::AthenaChromeAppsClient() {
18 }
19
20 AthenaChromeAppsClient::~AthenaChromeAppsClient() {
21 }
22
23 std::vector<content::BrowserContext*>
24 AthenaChromeAppsClient::GetLoadedBrowserContexts() {
25 std::vector<Profile*> profiles =
26 g_browser_process->profile_manager()->GetLoadedProfiles();
27 return std::vector<content::BrowserContext*>(profiles.begin(),
28 profiles.end());
29 }
30
31 extensions::AppWindow* AthenaChromeAppsClient::CreateAppWindow(
32 content::BrowserContext* context,
33 const extensions::Extension* extension) {
34 return new extensions::AppWindow(
35 context, new AthenaChromeAppDelegate, extension);
36 }
37
38 void AthenaChromeAppsClient::OpenDevToolsWindow(
39 content::WebContents* web_contents,
40 const base::Closure& callback) {
41 // TODO(oshima): Figure out what to do.
42 DevToolsWindow* devtools_window = DevToolsWindow::OpenDevToolsWindow(
43 web_contents, DevToolsToggleAction::ShowConsole());
44 devtools_window->SetLoadCompletedCallback(callback);
45 }
46
47 bool AthenaChromeAppsClient::IsCurrentChannelOlderThanDev() {
48 return extensions::GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV;
49 }
50
51 } // namespace athena
OLDNEW
« no previous file with comments | « athena/extensions/chrome/athena_chrome_apps_client.h ('k') | athena/extensions/chrome/extensions_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698