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

Side by Side Diff: chromeos/display/output_configurator.h

Issue 13472020: chromeos: Fix OutputConfigurator::Delegate leak. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | no next file » | 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 #ifndef CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ 5 #ifndef CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_
6 #define CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ 6 #define CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 // Returns next state. 265 // Returns next state.
266 OutputState GetNextState(const std::vector<OutputSnapshot>& outputs) const; 266 OutputState GetNextState(const std::vector<OutputSnapshot>& outputs) const;
267 267
268 // Computes the relevant transformation for mirror mode. 268 // Computes the relevant transformation for mirror mode.
269 // |output| is the output on which mirror mode is being applied. 269 // |output| is the output on which mirror mode is being applied.
270 // Returns the transformation, which would be identity if computations fail. 270 // Returns the transformation, which would be identity if computations fail.
271 CoordinateTransformation GetMirrorModeCTM( 271 CoordinateTransformation GetMirrorModeCTM(
272 const OutputConfigurator::OutputSnapshot* output); 272 const OutputConfigurator::OutputSnapshot* output);
273 273
274 StateController* state_controller_; 274 StateController* state_controller_;
275 Delegate* delegate_; 275 scoped_ptr<Delegate> delegate_;
276 276
277 // This is detected by the constructor to determine whether or not we should 277 // This is detected by the constructor to determine whether or not we should
278 // be enabled. If we aren't running on ChromeOS, we can't assume that the 278 // be enabled. If we aren't running on ChromeOS, we can't assume that the
279 // Xrandr X11 extension is supported. 279 // Xrandr X11 extension is supported.
280 // If this flag is set to false, any attempts to change the output 280 // If this flag is set to false, any attempts to change the output
281 // configuration to immediately fail without changing the state. 281 // configuration to immediately fail without changing the state.
282 bool configure_display_; 282 bool configure_display_;
283 283
284 // The number of outputs that are connected. 284 // The number of outputs that are connected.
285 int connected_output_count_; 285 int connected_output_count_;
(...skipping 14 matching lines...) Expand all
300 // The timer to delay configuring outputs. See also the comments in 300 // The timer to delay configuring outputs. See also the comments in
301 // |Dispatch()|. 301 // |Dispatch()|.
302 scoped_ptr<base::OneShotTimer<OutputConfigurator> > configure_timer_; 302 scoped_ptr<base::OneShotTimer<OutputConfigurator> > configure_timer_;
303 303
304 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); 304 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator);
305 }; 305 };
306 306
307 } // namespace chromeos 307 } // namespace chromeos
308 308
309 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ 309 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698