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

Side by Side Diff: chrome/browser/views/autocomplete/autocomplete_popup_win.cc

Issue 361020: Fix checkfailure on Linux Views build by actually opening the popup when it's... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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/autocomplete/autocomplete_popup_gtk.cc ('k') | no next file » | 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) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include "chrome/browser/views/autocomplete/autocomplete_popup_win.h" 5 #include "chrome/browser/views/autocomplete/autocomplete_popup_win.h"
6 6
7 #include "app/gfx/insets.h" 7 #include "app/gfx/insets.h"
8 #include "app/win_util.h" 8 #include "app/win_util.h"
9 #include "chrome/browser/autocomplete/autocomplete_edit_view_win.h" 9 #include "chrome/browser/autocomplete/autocomplete_edit_view_win.h"
10 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" 10 #include "chrome/browser/autocomplete/autocomplete_popup_model.h"
(...skipping 11 matching lines...) Expand all
22 set_window_ex_style(WS_EX_TOOLWINDOW | WS_EX_LAYERED); 22 set_window_ex_style(WS_EX_TOOLWINDOW | WS_EX_LAYERED);
23 } 23 }
24 24
25 AutocompletePopupWin::~AutocompletePopupWin() { 25 AutocompletePopupWin::~AutocompletePopupWin() {
26 } 26 }
27 27
28 void AutocompletePopupWin::Show() { 28 void AutocompletePopupWin::Show() {
29 // Move the popup to the place appropriate for the window's current position - 29 // Move the popup to the place appropriate for the window's current position -
30 // it may have been moved since it was last shown. 30 // it may have been moved since it was last shown.
31 SetBounds(contents_->GetPopupBounds()); 31 SetBounds(contents_->GetPopupBounds());
32 WidgetWin::Show(); 32 if (!IsVisible())
33 WidgetWin::Show();
33 is_open_ = true; 34 is_open_ = true;
34 } 35 }
35 36
36 void AutocompletePopupWin::Hide() { 37 void AutocompletePopupWin::Hide() {
37 WidgetWin::Hide(); 38 WidgetWin::Hide();
38 is_open_ = false; 39 is_open_ = false;
39 } 40 }
40 41
41 void AutocompletePopupWin::Init(AutocompleteEditView* edit_view, 42 void AutocompletePopupWin::Init(AutocompleteEditView* edit_view,
42 views::View* contents) { 43 views::View* contents) {
(...skipping 25 matching lines...) Expand all
68 return !!IsWindow(); 69 return !!IsWindow();
69 } 70 }
70 71
71 //////////////////////////////////////////////////////////////////////////////// 72 ////////////////////////////////////////////////////////////////////////////////
72 // AutocompletePopupWin, WidgetWin overrides: 73 // AutocompletePopupWin, WidgetWin overrides:
73 74
74 LRESULT AutocompletePopupWin::OnMouseActivate(HWND window, UINT hit_test, 75 LRESULT AutocompletePopupWin::OnMouseActivate(HWND window, UINT hit_test,
75 UINT mouse_message) { 76 UINT mouse_message) {
76 return MA_NOACTIVATE; 77 return MA_NOACTIVATE;
77 } 78 }
OLDNEW
« no previous file with comments | « chrome/browser/views/autocomplete/autocomplete_popup_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698