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

Side by Side Diff: ui/gfx/screen.cc

Issue 11146023: Work on separate browser contexts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another busted command line flag 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 | « ui/gfx/screen.h ('k') | ui/gfx/screen_type_delegate.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "ui/gfx/screen.h" 6 #include "ui/gfx/screen.h"
7 #include "ui/gfx/screen_type_delegate.h" 7 #include "ui/gfx/screen_type_delegate.h"
8 8
9 namespace gfx { 9 namespace gfx {
10 10
(...skipping 21 matching lines...) Expand all
32 return g_screen_[type]; 32 return g_screen_[type];
33 } 33 }
34 34
35 // static 35 // static
36 void Screen::SetScreenInstance(ScreenType type, Screen* instance) { 36 void Screen::SetScreenInstance(ScreenType type, Screen* instance) {
37 DCHECK_LE(type, SCREEN_TYPE_LAST); 37 DCHECK_LE(type, SCREEN_TYPE_LAST);
38 g_screen_[type] = instance; 38 g_screen_[type] = instance;
39 } 39 }
40 40
41 // static 41 // static
42 Screen* Screen::GetScreenByType(ScreenType type) {
43 DCHECK(g_screen_[type]);
44 return g_screen_[type];
45 }
46
47 // static
42 void Screen::SetScreenTypeDelegate(ScreenTypeDelegate* delegate) { 48 void Screen::SetScreenTypeDelegate(ScreenTypeDelegate* delegate) {
43 g_screen_type_delegate_ = delegate; 49 g_screen_type_delegate_ = delegate;
44 } 50 }
45 51
46 // static 52 // static
47 Screen* Screen::GetNativeScreen() { 53 Screen* Screen::GetNativeScreen() {
48 if (!g_screen_[SCREEN_TYPE_NATIVE]) 54 if (!g_screen_[SCREEN_TYPE_NATIVE])
49 g_screen_[SCREEN_TYPE_NATIVE] = CreateNativeScreen(); 55 g_screen_[SCREEN_TYPE_NATIVE] = CreateNativeScreen();
50 return g_screen_[SCREEN_TYPE_NATIVE]; 56 return g_screen_[SCREEN_TYPE_NATIVE];
51 } 57 }
52 58
53 } // namespace gfx 59 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/screen.h ('k') | ui/gfx/screen_type_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698