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

Unified Diff: ui/display/chromeos/display_configurator.cc

Issue 336863002: Moving input device hotplug event processing outside of ui/display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 side-by-side diff with in-line comments
Download patch
Index: ui/display/chromeos/display_configurator.cc
diff --git a/ui/display/chromeos/display_configurator.cc b/ui/display/chromeos/display_configurator.cc
index 65c54021f8dac5d8690ad5a99811a5f31b6123da..19e122566e8412af5a1c2d3a5670a1acaeecf42e 100644
--- a/ui/display/chromeos/display_configurator.cc
+++ b/ui/display/chromeos/display_configurator.cc
@@ -11,7 +11,6 @@
#include "base/strings/stringprintf.h"
#include "base/sys_info.h"
#include "base/time/time.h"
-#include "ui/display/chromeos/touchscreen_delegate_impl.h"
#include "ui/display/display_switches.h"
#include "ui/display/types/chromeos/display_mode.h"
#include "ui/display/types/chromeos/display_snapshot.h"
@@ -104,7 +103,6 @@ DisplayConfigurator::kSetDisplayPowerOnlyIfSingleInternalDisplay = 1 << 1;
DisplayConfigurator::DisplayState::DisplayState()
: display(NULL),
- touch_device_id(0),
selected_mode(NULL),
mirror_mode(NULL) {}
@@ -170,14 +168,11 @@ DisplayConfigurator::~DisplayConfigurator() {
native_display_delegate_->RemoveObserver(this);
}
-void DisplayConfigurator::SetDelegatesForTesting(
- scoped_ptr<NativeDisplayDelegate> display_delegate,
- scoped_ptr<TouchscreenDelegate> touchscreen_delegate) {
+void DisplayConfigurator::SetDelegateForTesting(
+ scoped_ptr<NativeDisplayDelegate> display_delegate) {
DCHECK(!native_display_delegate_);
- DCHECK(!touchscreen_delegate_);
native_display_delegate_ = display_delegate.Pass();
- touchscreen_delegate_ = touchscreen_delegate.Pass();
configure_display_ = true;
}
@@ -192,15 +187,12 @@ void DisplayConfigurator::Init(bool is_panel_fitting_enabled) {
if (!configure_display_)
return;
- // If the delegates are already initialized don't update them (For example,
- // tests set their own delegates).
+ // If the delegate is already initialized don't update it (For example, tests
+ // set their own delegates).
if (!native_display_delegate_) {
native_display_delegate_ = CreatePlatformNativeDisplayDelegate();
native_display_delegate_->AddObserver(this);
}
-
- if (!touchscreen_delegate_)
- touchscreen_delegate_.reset(new TouchscreenDelegateImpl());
}
void DisplayConfigurator::ForceInitialConfigure(
@@ -574,8 +566,6 @@ void DisplayConfigurator::UpdateCachedDisplays() {
cached_displays_.push_back(display_state);
}
- touchscreen_delegate_->AssociateTouchscreens(&cached_displays_);
-
// Set |selected_mode| fields.
for (size_t i = 0; i < cached_displays_.size(); ++i) {
DisplayState* display_state = &cached_displays_[i];

Powered by Google App Engine
This is Rietveld 408576698