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

Side by Side Diff: ash/system/web_notification/web_notification_tray.cc

Issue 16979002: Add ContextMenuSourceType to views::ContextMenuController::ShowContextMenuForView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win build Created 7 years, 6 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 "ash/system/web_notification/web_notification_tray.h" 5 #include "ash/system/web_notification/web_notification_tray.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shelf/shelf_layout_manager.h" 8 #include "ash/shelf/shelf_layout_manager.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 scoped_ptr<ui::MenuModel> menu_model( 307 scoped_ptr<ui::MenuModel> menu_model(
308 message_center_tray_->CreateQuietModeMenu()); 308 message_center_tray_->CreateQuietModeMenu());
309 quiet_mode_menu_runner_.reset(new views::MenuRunner(menu_model.get())); 309 quiet_mode_menu_runner_.reset(new views::MenuRunner(menu_model.get()));
310 gfx::Point point; 310 gfx::Point point;
311 views::View::ConvertPointToScreen(this, &point); 311 views::View::ConvertPointToScreen(this, &point);
312 if (quiet_mode_menu_runner_->RunMenuAt( 312 if (quiet_mode_menu_runner_->RunMenuAt(
313 GetWidget(), 313 GetWidget(),
314 NULL, 314 NULL,
315 gfx::Rect(point, bounds().size()), 315 gfx::Rect(point, bounds().size()),
316 views::MenuItemView::BUBBLE_ABOVE, 316 views::MenuItemView::BUBBLE_ABOVE,
317 ui::MENU_SOURCE_NONE,
sky 2013/06/17 16:08:19 Why the none here? Looks like the caller has an ev
varunjain 2013/06/17 20:13:55 Done.
317 views::MenuRunner::HAS_MNEMONICS) == views::MenuRunner::MENU_DELETED) 318 views::MenuRunner::HAS_MNEMONICS) == views::MenuRunner::MENU_DELETED)
318 return; 319 return;
319 320
320 quiet_mode_menu_runner_.reset(); 321 quiet_mode_menu_runner_.reset();
321 GetShelfLayoutManager()->UpdateAutoHideState(); 322 GetShelfLayoutManager()->UpdateAutoHideState();
322 } 323 }
323 324
324 bool WebNotificationTray::ShouldShowQuietModeMenu(const ui::Event& event) { 325 bool WebNotificationTray::ShouldShowQuietModeMenu(const ui::Event& event) {
325 // TODO(mukai): Add keyboard event handler. 326 // TODO(mukai): Add keyboard event handler.
326 if (!event.IsMouseEvent()) 327 if (!event.IsMouseEvent())
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 517
517 message_center::MessagePopupBubble* 518 message_center::MessagePopupBubble*
518 WebNotificationTray::GetPopupBubbleForTest() { 519 WebNotificationTray::GetPopupBubbleForTest() {
519 if (!popup_bubble()) 520 if (!popup_bubble())
520 return NULL; 521 return NULL;
521 return static_cast<message_center::MessagePopupBubble*>( 522 return static_cast<message_center::MessagePopupBubble*>(
522 popup_bubble()->bubble()); 523 popup_bubble()->bubble());
523 } 524 }
524 525
525 } // namespace ash 526 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698