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

Unified Diff: chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc

Issue 10675011: Rename the remaining usage of Monitor to Display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 6 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
« no previous file with comments | « chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc ('k') | chromeos/chromeos.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc
diff --git a/chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc b/chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc
index 835b742fc43befd89b2a2f936b4022101522a83d..d9bdd8cc122648a34d0964358f8b867c01b38318 100644
--- a/chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc
+++ b/chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc
@@ -6,16 +6,16 @@
#include <string>
-#include "ash/monitor/monitor_controller.h"
+#include "ash/display/display_controller.h"
#include "ash/shell.h"
#include "base/logging.h"
#include "base/json/json_value_converter.h"
#include "base/values.h"
-#include "chromeos/monitor/output_configurator.h"
+#include "chromeos/display/output_configurator.h"
#include "content/public/browser/web_ui.h"
#include "grit/generated_resources.h"
#include "ui/aura/env.h"
-#include "ui/aura/monitor_manager.h"
+#include "ui/aura/display_manager.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/display.h"
#include "ui/gfx/rect.h"
@@ -23,14 +23,14 @@
namespace chromeos {
namespace options2 {
-using ash::internal::MonitorController;
+using ash::internal::DisplayController;
DisplayOptionsHandler::DisplayOptionsHandler() {
- aura::Env::GetInstance()->monitor_manager()->AddObserver(this);
+ aura::Env::GetInstance()->display_manager()->AddObserver(this);
}
DisplayOptionsHandler::~DisplayOptionsHandler() {
- aura::Env::GetInstance()->monitor_manager()->RemoveObserver(this);
+ aura::Env::GetInstance()->display_manager()->RemoveObserver(this);
}
void DisplayOptionsHandler::GetLocalizedValues(
@@ -80,13 +80,13 @@ void DisplayOptionsHandler::OnDisplayRemoved(const gfx::Display& old_display) {
}
void DisplayOptionsHandler::UpdateDisplaySectionVisibility() {
- aura::MonitorManager* monitor_manager =
- aura::Env::GetInstance()->monitor_manager();
+ aura::DisplayManager* display_manager =
+ aura::Env::GetInstance()->display_manager();
chromeos::State output_state =
ash::Shell::GetInstance()->output_configurator()->output_state();
base::FundamentalValue show_options(
- MonitorController::IsExtendedDesktopEnabled() &&
- monitor_manager->GetNumDisplays() > 1 &&
+ DisplayController::IsExtendedDesktopEnabled() &&
+ display_manager->GetNumDisplays() > 1 &&
output_state != chromeos::STATE_INVALID &&
output_state != chromeos::STATE_HEADLESS &&
output_state != chromeos::STATE_SINGLE);
@@ -95,16 +95,16 @@ void DisplayOptionsHandler::UpdateDisplaySectionVisibility() {
}
void DisplayOptionsHandler::SendDisplayInfo() {
- aura::MonitorManager* monitor_manager =
- aura::Env::GetInstance()->monitor_manager();
+ aura::DisplayManager* display_manager =
+ aura::Env::GetInstance()->display_manager();
chromeos::OutputConfigurator* output_configurator =
ash::Shell::GetInstance()->output_configurator();
base::FundamentalValue mirroring(
output_configurator->output_state() == chromeos::STATE_DUAL_MIRROR);
base::ListValue displays;
- for (size_t i = 0; i < monitor_manager->GetNumDisplays(); ++i) {
- const gfx::Display& display = monitor_manager->GetDisplayAt(i);
+ for (size_t i = 0; i < display_manager->GetNumDisplays(); ++i) {
+ const gfx::Display& display = display_manager->GetDisplayAt(i);
const gfx::Rect& bounds = display.bounds();
base::DictionaryValue* js_display = new base::DictionaryValue();
js_display->SetDouble("id", display.id());
@@ -115,10 +115,10 @@ void DisplayOptionsHandler::SendDisplayInfo() {
displays.Set(i, js_display);
}
- MonitorController* monitor_controller =
- ash::Shell::GetInstance()->monitor_controller();
+ DisplayController* display_controller =
+ ash::Shell::GetInstance()->display_controller();
base::FundamentalValue layout(static_cast<int>(
- monitor_controller->secondary_display_layout()));
+ display_controller->secondary_display_layout()));
web_ui()->CallJavascriptFunction(
"options.DisplayOptions.setDisplayInfo",
@@ -148,11 +148,11 @@ void DisplayOptionsHandler::HandleDisplayLayout(const base::ListValue* args) {
LOG(ERROR) << "Invalid parameter";
return;
}
- DCHECK_LE(MonitorController::TOP, layout);
- DCHECK_GE(MonitorController::LEFT, layout);
+ DCHECK_LE(DisplayController::TOP, layout);
+ DCHECK_GE(DisplayController::LEFT, layout);
- ash::Shell::GetInstance()->monitor_controller()->SetSecondaryDisplayLayout(
- static_cast<MonitorController::SecondaryDisplayLayout>(layout));
+ ash::Shell::GetInstance()->display_controller()->SetSecondaryDisplayLayout(
+ static_cast<DisplayController::SecondaryDisplayLayout>(layout));
SendDisplayInfo();
}
« no previous file with comments | « chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc ('k') | chromeos/chromeos.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698