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

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

Issue 6976040: Revert 86914 - Move a bunch of functions from Window onto Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
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/network_menu.h" 5 #include "chrome/browser/chromeos/status/network_menu.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 //////////////////////////////////////////////////////////////////////////////// 507 ////////////////////////////////////////////////////////////////////////////////
508 // NetworkMenuModel, private methods: 508 // NetworkMenuModel, private methods:
509 509
510 // TODO(stevenjb): deprecate this once we've committed to tabbed settings 510 // TODO(stevenjb): deprecate this once we've committed to tabbed settings
511 // and the embedded menu UI (and fully deprecated NetworkConfigView). 511 // and the embedded menu UI (and fully deprecated NetworkConfigView).
512 // Meanwhile, if MenuUI::IsEnabled() is true, always show the settings UI, 512 // Meanwhile, if MenuUI::IsEnabled() is true, always show the settings UI,
513 // otherwise show NetworkConfigView only to get passwords when not connected. 513 // otherwise show NetworkConfigView only to get passwords when not connected.
514 void NetworkMenuModel::ShowNetworkConfigView(NetworkConfigView* view) const { 514 void NetworkMenuModel::ShowNetworkConfigView(NetworkConfigView* view) const {
515 views::Window* window = browser::CreateViewsWindow( 515 views::Window* window = browser::CreateViewsWindow(
516 owner_->GetNativeWindow(), gfx::Rect(), view); 516 owner_->GetNativeWindow(), gfx::Rect(), view);
517 window->SetAlwaysOnTop(true); 517 window->SetIsAlwaysOnTop(true);
518 window->Show(); 518 window->Show();
519 } 519 }
520 520
521 void NetworkMenuModel::ActivateCellular(const CellularNetwork* cellular) const { 521 void NetworkMenuModel::ActivateCellular(const CellularNetwork* cellular) const {
522 DCHECK(cellular); 522 DCHECK(cellular);
523 Browser* browser = BrowserList::GetLastActive(); 523 Browser* browser = BrowserList::GetLastActive();
524 if (!browser) 524 if (!browser)
525 return; 525 return;
526 browser->OpenMobilePlanTabAndActivate(); 526 browser->OpenMobilePlanTabAndActivate();
527 } 527 }
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 1433
1434 gfx::Point screen_loc; 1434 gfx::Point screen_loc;
1435 views::View::ConvertPointToScreen(source, &screen_loc); 1435 views::View::ConvertPointToScreen(source, &screen_loc);
1436 gfx::Rect bounds(screen_loc, source->size()); 1436 gfx::Rect bounds(screen_loc, source->size());
1437 network_menu_->GetSubmenu()->set_minimum_preferred_width(min_width_); 1437 network_menu_->GetSubmenu()->set_minimum_preferred_width(min_width_);
1438 network_menu_->RunMenuAt(window, GetMenuButton(), bounds, 1438 network_menu_->RunMenuAt(window, GetMenuButton(), bounds,
1439 views::MenuItemView::TOPRIGHT, true); 1439 views::MenuItemView::TOPRIGHT, true);
1440 } 1440 }
1441 1441
1442 } // namespace chromeos 1442 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/network_login_observer.cc ('k') | chrome/browser/ui/views/first_run_search_engine_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698