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

Side by Side Diff: views/controls/menu/chrome_menu.cc

Issue 141013: Relanding focus manager refactoring (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/views/tabs/tab_strip.cc ('k') | views/controls/native_control.cc » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "views/controls/menu/chrome_menu.h" 5 #include "views/controls/menu/chrome_menu.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <uxtheme.h> 8 #include <uxtheme.h>
9 #include <Vssym32.h> 9 #include <Vssym32.h>
10 10
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 (GetKeyState(VK_XBUTTON1) & 0x80) || 678 (GetKeyState(VK_XBUTTON1) & 0x80) ||
679 (GetKeyState(VK_XBUTTON2) & 0x80)); 679 (GetKeyState(VK_XBUTTON2) & 0x80));
680 // Mouse clicks shouldn't give us focus. 680 // Mouse clicks shouldn't give us focus.
681 set_window_ex_style(WS_EX_TOPMOST | WS_EX_NOACTIVATE); 681 set_window_ex_style(WS_EX_TOPMOST | WS_EX_NOACTIVATE);
682 } 682 }
683 683
684 void Init(HWND parent, 684 void Init(HWND parent,
685 const gfx::Rect& bounds, 685 const gfx::Rect& bounds,
686 View* contents_view, 686 View* contents_view,
687 bool do_capture) { 687 bool do_capture) {
688 WidgetWin::Init(parent, bounds, true); 688 WidgetWin::Init(parent, bounds);
689 SetContentsView(contents_view); 689 SetContentsView(contents_view);
690 // We don't want to take focus away from the hosting window. 690 // We don't want to take focus away from the hosting window.
691 ShowWindow(SW_SHOWNA); 691 ShowWindow(SW_SHOWNA);
692 owns_capture_ = do_capture; 692 owns_capture_ = do_capture;
693 if (do_capture) { 693 if (do_capture) {
694 SetCapture(); 694 SetCapture();
695 has_capture_ = true; 695 has_capture_ = true;
696 #ifdef DEBUG_MENU 696 #ifdef DEBUG_MENU
697 DLOG(INFO) << "Doing capture"; 697 DLOG(INFO) << "Doing capture";
698 #endif 698 #endif
(...skipping 2120 matching lines...) Expand 10 before | Expand all | Expand 10 after
2819 if (!scroll_task_.get()) 2819 if (!scroll_task_.get())
2820 scroll_task_.reset(new MenuScrollTask()); 2820 scroll_task_.reset(new MenuScrollTask());
2821 scroll_task_->Update(part); 2821 scroll_task_->Update(part);
2822 } 2822 }
2823 2823
2824 void MenuController::StopScrolling() { 2824 void MenuController::StopScrolling() {
2825 scroll_task_.reset(NULL); 2825 scroll_task_.reset(NULL);
2826 } 2826 }
2827 2827
2828 } // namespace views 2828 } // namespace views
OLDNEW
« no previous file with comments | « chrome/browser/views/tabs/tab_strip.cc ('k') | views/controls/native_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698