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

Side by Side Diff: chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc

Issue 12093075: Move the panel to the root window where the mouse click occurred. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated comment Created 7 years, 10 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) 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 "chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h" 5 #include "chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h"
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/launcher/launcher_model.h" 8 #include "ash/launcher/launcher_model.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 window_->Show(); 138 window_->Show();
139 ash::wm::ActivateWindow(window_); 139 ash::wm::ActivateWindow(window_);
140 } 140 }
141 141
142 void BrowserLauncherItemController::Close() { 142 void BrowserLauncherItemController::Close() {
143 views::Widget* widget = views::Widget::GetWidgetForNativeView(window_); 143 views::Widget* widget = views::Widget::GetWidgetForNativeView(window_);
144 if (widget) 144 if (widget)
145 widget->Close(); 145 widget->Close();
146 } 146 }
147 147
148 void BrowserLauncherItemController::Clicked() { 148 void BrowserLauncherItemController::Clicked(const ui::Event& event) {
149 views::Widget* widget = 149 views::Widget* widget =
150 views::Widget::GetWidgetForNativeView(window_); 150 views::Widget::GetWidgetForNativeView(window_);
151 if (widget && widget->IsActive()) { 151 if (widget && widget->IsActive()) {
152 widget->Minimize(); 152 widget->Minimize();
153 } else { 153 } else {
154 Activate(); 154 Activate();
155 } 155 }
156 } 156 }
157 157
158 void BrowserLauncherItemController::OnRemoved() { 158 void BrowserLauncherItemController::OnRemoved() {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 app_state = ChromeLauncherController::APP_STATE_ACTIVE; 319 app_state = ChromeLauncherController::APP_STATE_ACTIVE;
320 } else { 320 } else {
321 app_state = ChromeLauncherController::APP_STATE_INACTIVE; 321 app_state = ChromeLauncherController::APP_STATE_INACTIVE;
322 } 322 }
323 launcher_controller()->UpdateAppState(tab, app_state); 323 launcher_controller()->UpdateAppState(tab, app_state);
324 } 324 }
325 325
326 ash::LauncherModel* BrowserLauncherItemController::launcher_model() { 326 ash::LauncherModel* BrowserLauncherItemController::launcher_model() {
327 return launcher_controller()->model(); 327 return launcher_controller()->model();
328 } 328 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698