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

Side by Side Diff: chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc

Issue 8590003: chrome: Remove 11 exit time destructors and 4 static initializers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no gyp changes :-( Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/gtk/omnibox/omnibox_view_gtk.h" 5 #include "chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 view_state(view_state) { 98 view_state(view_state) {
99 } 99 }
100 100
101 const AutocompleteEditModel::State model_state; 101 const AutocompleteEditModel::State model_state;
102 const ViewState view_state; 102 const ViewState view_state;
103 }; 103 };
104 104
105 // Returns a lazily initialized property bag accessor for saving our state in a 105 // Returns a lazily initialized property bag accessor for saving our state in a
106 // TabContents. 106 // TabContents.
107 PropertyAccessor<AutocompleteEditState>* GetStateAccessor() { 107 PropertyAccessor<AutocompleteEditState>* GetStateAccessor() {
108 static PropertyAccessor<AutocompleteEditState> state; 108 CR_DEFINE_STATIC_LOCAL(PropertyAccessor<AutocompleteEditState>, state, ());
109 return &state; 109 return &state;
110 } 110 }
111 111
112 // Set up style properties to override the default GtkTextView; if a theme has 112 // Set up style properties to override the default GtkTextView; if a theme has
113 // overridden some of these properties, an inner-line will be displayed inside 113 // overridden some of these properties, an inner-line will be displayed inside
114 // the fake GtkTextEntry. 114 // the fake GtkTextEntry.
115 void SetEntryStyle() { 115 void SetEntryStyle() {
116 static bool style_was_set = false; 116 static bool style_was_set = false;
117 117
118 if (style_was_set) 118 if (style_was_set)
(...skipping 2275 matching lines...) Expand 10 before | Expand all | Expand 10 after
2394 2394
2395 // Make all the children of the widget visible. NOTE: this won't display 2395 // Make all the children of the widget visible. NOTE: this won't display
2396 // anything, it just toggles the visible flag. 2396 // anything, it just toggles the visible flag.
2397 gtk_widget_show_all(omnibox_view->GetNativeView()); 2397 gtk_widget_show_all(omnibox_view->GetNativeView());
2398 // Hide the widget. NativeViewHostGtk will make it visible again as necessary. 2398 // Hide the widget. NativeViewHostGtk will make it visible again as necessary.
2399 gtk_widget_hide(omnibox_view->GetNativeView()); 2399 gtk_widget_hide(omnibox_view->GetNativeView());
2400 2400
2401 return omnibox_view; 2401 return omnibox_view;
2402 } 2402 }
2403 #endif 2403 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698