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

Side by Side Diff: chrome/browser/chromeos/display/output_protection_delegate.cc

Issue 1920263003: Rename gfx::Display/Screen to display::Display/Screen in chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/display/output_protection_delegate.h" 5 #include "chrome/browser/chromeos/display/output_protection_delegate.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_delegate.h" 8 #include "ash/shell_delegate.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 10 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
12 #include "content/public/browser/render_frame_host.h" 12 #include "content/public/browser/render_frame_host.h"
13 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
14 #include "ui/gfx/screen.h" 14 #include "ui/display/screen.h"
15 15
16 namespace chromeos { 16 namespace chromeos {
17 17
18 namespace { 18 namespace {
19 19
20 bool GetCurrentDisplayId(content::RenderFrameHost* rfh, int64_t* display_id) { 20 bool GetCurrentDisplayId(content::RenderFrameHost* rfh, int64_t* display_id) {
21 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 21 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
22 DCHECK(rfh); 22 DCHECK(rfh);
23 DCHECK(display_id); 23 DCHECK(display_id);
24 24
25 gfx::Screen* screen = gfx::Screen::GetScreen(); 25 display::Screen* screen = display::Screen::GetScreen();
26 if (!screen) 26 if (!screen)
27 return false; 27 return false;
28 gfx::Display display = screen->GetDisplayNearestWindow(rfh->GetNativeView()); 28 display::Display display =
29 screen->GetDisplayNearestWindow(rfh->GetNativeView());
29 *display_id = display.id(); 30 *display_id = display.id();
30 return true; 31 return true;
31 } 32 }
32 33
33 void DoNothing(bool status) { 34 void DoNothing(bool status) {
34 } 35 }
35 36
36 } // namespace 37 } // namespace
37 38
38 OutputProtectionDelegate::OutputProtectionDelegate(int render_process_id, 39 OutputProtectionDelegate::OutputProtectionDelegate(int render_process_id,
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 display_id_ = new_display_id; 184 display_id_ = new_display_id;
184 } 185 }
185 186
186 void OutputProtectionDelegate::OnWindowDestroying(aura::Window* window) { 187 void OutputProtectionDelegate::OnWindowDestroying(aura::Window* window) {
187 DCHECK_EQ(window, window_); 188 DCHECK_EQ(window, window_);
188 window_->RemoveObserver(this); 189 window_->RemoveObserver(this);
189 window_ = nullptr; 190 window_ = nullptr;
190 } 191 }
191 192
192 } // namespace chromeos 193 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/display/display_preferences_unittest.cc ('k') | chrome/browser/chromeos/display/overscan_calibrator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698