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

Side by Side Diff: ui/views/controls/textfield/textfield.cc

Issue 15419002: views: Store only the name of the class in kViewClassName constants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/native/native_view_host.cc ('k') | ui/views/view.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 "ui/views/controls/textfield/textfield.h" 5 #include "ui/views/controls/textfield/textfield.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 29 matching lines...) Expand all
40 const SkColor kDefaultPlaceholderTextColor = SK_ColorLTGRAY; 40 const SkColor kDefaultPlaceholderTextColor = SK_ColorLTGRAY;
41 41
42 } // namespace 42 } // namespace
43 43
44 namespace views { 44 namespace views {
45 45
46 ///////////////////////////////////////////////////////////////////////////// 46 /////////////////////////////////////////////////////////////////////////////
47 // Textfield 47 // Textfield
48 48
49 // static 49 // static
50 const char Textfield::kViewClassName[] = "views/Textfield"; 50 const char Textfield::kViewClassName[] = "Textfield";
51 51
52 // static 52 // static
53 bool Textfield::IsViewsTextfieldEnabled() { 53 bool Textfield::IsViewsTextfieldEnabled() {
54 #if defined(OS_WIN) && !defined(USE_AURA) 54 #if defined(OS_WIN) && !defined(USE_AURA)
55 CommandLine* command_line = CommandLine::ForCurrentProcess(); 55 CommandLine* command_line = CommandLine::ForCurrentProcess();
56 if (command_line->HasSwitch(switches::kDisableViewsTextfield)) 56 if (command_line->HasSwitch(switches::kDisableViewsTextfield))
57 return false; 57 return false;
58 if (command_line->HasSwitch(switches::kEnableViewsTextfield)) 58 if (command_line->HasSwitch(switches::kEnableViewsTextfield))
59 return true; 59 return true;
60 // The new dialog style cannot host native Windows textfield controls. 60 // The new dialog style cannot host native Windows textfield controls.
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( 593 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper(
594 Textfield* field) { 594 Textfield* field) {
595 #if defined(OS_WIN) && !defined(USE_AURA) 595 #if defined(OS_WIN) && !defined(USE_AURA)
596 if (!Textfield::IsViewsTextfieldEnabled()) 596 if (!Textfield::IsViewsTextfieldEnabled())
597 return new NativeTextfieldWin(field); 597 return new NativeTextfieldWin(field);
598 #endif 598 #endif
599 return new NativeTextfieldViews(field); 599 return new NativeTextfieldViews(field);
600 } 600 }
601 601
602 } // namespace views 602 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/native/native_view_host.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698