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

Side by Side Diff: chrome/browser/chromeos/status/power_menu_button.cc

Issue 7425001: Change the variable name to follow the coding rule. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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 | « chrome/browser/chromeos/status/network_menu.cc ('k') | 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) 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/chromeos/status/power_menu_button.h" 5 #include "chrome/browser/chromeos/status/power_menu_button.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/chromeos/cros/cros_library.h" 10 #include "chrome/browser/chromeos/cros/cros_library.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 // TODO(rhashimoto): Remove this workaround when WebUI provides a 131 // TODO(rhashimoto): Remove this workaround when WebUI provides a
132 // top-level widget on the ChromeOS login screen that is a window. 132 // top-level widget on the ChromeOS login screen that is a window.
133 // The current BackgroundView class for the ChromeOS login screen 133 // The current BackgroundView class for the ChromeOS login screen
134 // creates a owning Widget that has a native GtkWindow but is not a 134 // creates a owning Widget that has a native GtkWindow but is not a
135 // Window. This makes it impossible to get the NativeWindow via 135 // Window. This makes it impossible to get the NativeWindow via
136 // the views API. This workaround casts the top-level NativeWidget 136 // the views API. This workaround casts the top-level NativeWidget
137 // to a NativeWindow that we can pass to MenuItemView::RunMenuAt(). 137 // to a NativeWindow that we can pass to MenuItemView::RunMenuAt().
138 gfx::NativeWindow window = GTK_WINDOW(source->GetWidget()->GetNativeView()); 138 gfx::NativeWindow window = GTK_WINDOW(source->GetWidget()->GetNativeView());
139 139
140 gfx::Point screen_loc; 140 gfx::Point screen_location;
141 views::View::ConvertPointToScreen(source, &screen_loc); 141 views::View::ConvertPointToScreen(source, &screen_location);
142 gfx::Rect bounds(screen_loc, source->size()); 142 gfx::Rect bounds(screen_location, source->size());
143 menu_->RunMenuAt( 143 menu_->RunMenuAt(
144 window, 144 window,
145 this, 145 this,
146 bounds, 146 bounds,
147 views::MenuItemView::TOPRIGHT, 147 views::MenuItemView::TOPRIGHT,
148 true); 148 true);
149 } 149 }
150 150
151 //////////////////////////////////////////////////////////////////////////////// 151 ////////////////////////////////////////////////////////////////////////////////
152 // PowerMenuButton, PowerLibrary::Observer implementation: 152 // PowerMenuButton, PowerLibrary::Observer implementation:
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 menu_->AppendDelegateMenuItem(POWER_BATTERY_IS_CHARGED_ITEM); 260 menu_->AppendDelegateMenuItem(POWER_BATTERY_IS_CHARGED_ITEM);
261 } else { 261 } else {
262 menu_->AppendMenuItemWithLabel( 262 menu_->AppendMenuItemWithLabel(
263 POWER_NO_BATTERY, 263 POWER_NO_BATTERY,
264 UTF16ToWide(l10n_util::GetStringUTF16(IDS_STATUSBAR_NO_BATTERY))); 264 UTF16ToWide(l10n_util::GetStringUTF16(IDS_STATUSBAR_NO_BATTERY)));
265 } 265 }
266 menu_->ChildrenChanged(); 266 menu_->ChildrenChanged();
267 } 267 }
268 268
269 } // namespace chromeos 269 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/network_menu.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698