forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move ConsoleServiceProvider to chromeos/dbus/services
Introduce ConsoleServiceProvider::Delegate to get rid of dependencies to ash/ and ui/. BUG=429354 Review URL: https://codereview.chromium.org/734333003 Cr-Commit-Position: refs/heads/master@{#304757}
- Loading branch information
hashimoto
authored and
Commit bot
committed
Nov 19, 2014
1 parent
dd2467b
commit 574275c
Showing
7 changed files
with
87 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
chrome/browser/chromeos/dbus/chrome_console_service_provider_delegate.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "chrome/browser/chromeos/dbus/chrome_console_service_provider_delegate.h" | ||
|
||
#include "ash/shell.h" | ||
#include "ui/display/chromeos/display_configurator.h" | ||
|
||
namespace chromeos { | ||
|
||
ChromeConsoleServiceProviderDelegate::ChromeConsoleServiceProviderDelegate() { | ||
} | ||
|
||
ChromeConsoleServiceProviderDelegate::~ChromeConsoleServiceProviderDelegate() { | ||
} | ||
|
||
void ChromeConsoleServiceProviderDelegate::TakeDisplayOwnership() { | ||
ash::Shell::GetInstance()->display_configurator()->TakeControl(); | ||
} | ||
|
||
void ChromeConsoleServiceProviderDelegate::ReleaseDisplayOwnership() { | ||
ash::Shell::GetInstance()->display_configurator()->RelinquishControl(); | ||
} | ||
|
||
} // namespace chromeos |
29 changes: 29 additions & 0 deletions
29
chrome/browser/chromeos/dbus/chrome_console_service_provider_delegate.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef CHROME_BROWSER_CHROMEOS_DBUS_CHROME_CONSOLE_SERVICE_PROVIDER_DELEGATE_H_ | ||
#define CHROME_BROWSER_CHROMEOS_DBUS_CHROME_CONSOLE_SERVICE_PROVIDER_DELEGATE_H_ | ||
|
||
#include "chromeos/dbus/services/console_service_provider.h" | ||
|
||
namespace chromeos { | ||
|
||
// Chrome's implementation of ConsoleServiceProvider::Delegate | ||
class ChromeConsoleServiceProviderDelegate | ||
: public ConsoleServiceProvider::Delegate { | ||
public: | ||
ChromeConsoleServiceProviderDelegate(); | ||
~ChromeConsoleServiceProviderDelegate() override; | ||
|
||
// ConsoleServiceProvider::Delegate overrides: | ||
void TakeDisplayOwnership() override; | ||
void ReleaseDisplayOwnership() override; | ||
|
||
private: | ||
DISALLOW_COPY_AND_ASSIGN(ChromeConsoleServiceProviderDelegate); | ||
}; | ||
|
||
} // namespace chromeos | ||
|
||
#endif // CHROME_BROWSER_CHROMEOS_DBUS_CHROME_CONSOLE_SERVICE_PROVIDER_DELEGATE_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters