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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/display_options_handler.cc

Issue 10974014: Disable extended desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated comments. keep pointer inside root Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chromeos/display/output_configurator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/options/chromeos/display_options_handler.h" 5 #include "chrome/browser/ui/webui/options/chromeos/display_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/display/display_controller.h" 9 #include "ash/display/display_controller.h"
10 #include "ash/display/output_configurator_animation.h" 10 #include "ash/display/output_configurator_animation.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 UpdateDisplaySectionVisibility(); 83 UpdateDisplaySectionVisibility();
84 SendDisplayInfo(); 84 SendDisplayInfo();
85 } 85 }
86 86
87 void DisplayOptionsHandler::OnDisplayRemoved(const gfx::Display& old_display) { 87 void DisplayOptionsHandler::OnDisplayRemoved(const gfx::Display& old_display) {
88 UpdateDisplaySectionVisibility(); 88 UpdateDisplaySectionVisibility();
89 SendDisplayInfo(); 89 SendDisplayInfo();
90 } 90 }
91 91
92 void DisplayOptionsHandler::UpdateDisplaySectionVisibility() { 92 void DisplayOptionsHandler::UpdateDisplaySectionVisibility() {
93 chromeos::OutputState output_state = 93 // TODO(oshima): Temporarily disable the display options.
94 ash::Shell::GetInstance()->output_configurator()->output_state(); 94 // crbug.com/152003.
95 base::FundamentalValue show_options( 95 base::FundamentalValue show_options(false);
96 output_state != chromeos::STATE_INVALID &&
97 output_state != chromeos::STATE_HEADLESS &&
98 output_state != chromeos::STATE_SINGLE);
99 web_ui()->CallJavascriptFunction( 96 web_ui()->CallJavascriptFunction(
100 "options.BrowserOptions.showDisplayOptions", show_options); 97 "options.BrowserOptions.showDisplayOptions", show_options);
101 } 98 }
102 99
103 void DisplayOptionsHandler::SendDisplayInfo() { 100 void DisplayOptionsHandler::SendDisplayInfo() {
104 aura::DisplayManager* display_manager = 101 aura::DisplayManager* display_manager =
105 aura::Env::GetInstance()->display_manager(); 102 aura::Env::GetInstance()->display_manager();
106 ash::DisplayController* display_controller = 103 ash::DisplayController* display_controller =
107 ash::Shell::GetInstance()->display_controller(); 104 ash::Shell::GetInstance()->display_controller();
108 chromeos::OutputConfigurator* output_configurator = 105 chromeos::OutputConfigurator* output_configurator =
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 ash::Shell::GetInstance()->output_configurator_animation()-> 196 ash::Shell::GetInstance()->output_configurator_animation()->
200 StartFadeOutAnimation(base::Bind( 197 StartFadeOutAnimation(base::Bind(
201 &DisplayOptionsHandler::FadeOutForDisplayLayoutFinished, 198 &DisplayOptionsHandler::FadeOutForDisplayLayoutFinished,
202 base::Unretained(this), 199 base::Unretained(this),
203 static_cast<int>(layout), 200 static_cast<int>(layout),
204 static_cast<int>(offset))); 201 static_cast<int>(offset)));
205 } 202 }
206 203
207 } // namespace options 204 } // namespace options
208 } // namespace chromeos 205 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chromeos/display/output_configurator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698