OLD | NEW |
1 // Copyright (c) 2010 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/views/status_icons/status_icon_win.h" | 5 #include "chrome/browser/ui/views/status_icons/status_icon_win.h" |
6 | 6 |
7 #include "base/sys_string_conversions.h" | 7 #include "base/sys_string_conversions.h" |
8 #include "gfx/icon_util.h" | 8 #include "gfx/icon_util.h" |
9 #include "gfx/point.h" | 9 #include "gfx/point.h" |
10 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
11 #include "views/controls/menu/menu_2.h" | 11 #include "views/controls/menu/menu_2.h" |
12 | 12 |
13 StatusIconWin::StatusIconWin(UINT id, HWND window, UINT message) | 13 StatusIconWin::StatusIconWin(UINT id, HWND window, UINT message) |
14 : icon_id_(id), | 14 : icon_id_(id), |
15 window_(window), | 15 window_(window), |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 } | 80 } |
81 | 81 |
82 // Event not sent to the observer, so display the context menu if one exists. | 82 // Event not sent to the observer, so display the context menu if one exists. |
83 if (context_menu_.get()) { | 83 if (context_menu_.get()) { |
84 // Set our window as the foreground window, so the context menu closes when | 84 // Set our window as the foreground window, so the context menu closes when |
85 // we click away from it. | 85 // we click away from it. |
86 SetForegroundWindow(window_); | 86 SetForegroundWindow(window_); |
87 context_menu_->RunContextMenuAt(gfx::Point(x, y)); | 87 context_menu_->RunContextMenuAt(gfx::Point(x, y)); |
88 } | 88 } |
89 } | 89 } |
OLD | NEW |