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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 6480001: Migrate Event API methods to Google Style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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) 2011 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/ui/views/location_bar/location_bar_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 } 690 }
691 691
692 void LocationBarView::SelectAll() { 692 void LocationBarView::SelectAll() {
693 location_entry_->SelectAll(true); 693 location_entry_->SelectAll(true);
694 } 694 }
695 695
696 #if defined(OS_WIN) 696 #if defined(OS_WIN)
697 bool LocationBarView::OnMousePressed(const views::MouseEvent& event) { 697 bool LocationBarView::OnMousePressed(const views::MouseEvent& event) {
698 UINT msg; 698 UINT msg;
699 if (event.IsLeftMouseButton()) { 699 if (event.IsLeftMouseButton()) {
700 msg = (event.GetFlags() & views::MouseEvent::EF_IS_DOUBLE_CLICK) ? 700 msg = (event.flags() & views::MouseEvent::EF_IS_DOUBLE_CLICK) ?
701 WM_LBUTTONDBLCLK : WM_LBUTTONDOWN; 701 WM_LBUTTONDBLCLK : WM_LBUTTONDOWN;
702 } else if (event.IsMiddleMouseButton()) { 702 } else if (event.IsMiddleMouseButton()) {
703 msg = (event.GetFlags() & views::MouseEvent::EF_IS_DOUBLE_CLICK) ? 703 msg = (event.flags() & views::MouseEvent::EF_IS_DOUBLE_CLICK) ?
704 WM_MBUTTONDBLCLK : WM_MBUTTONDOWN; 704 WM_MBUTTONDBLCLK : WM_MBUTTONDOWN;
705 } else if (event.IsRightMouseButton()) { 705 } else if (event.IsRightMouseButton()) {
706 msg = (event.GetFlags() & views::MouseEvent::EF_IS_DOUBLE_CLICK) ? 706 msg = (event.flags() & views::MouseEvent::EF_IS_DOUBLE_CLICK) ?
707 WM_RBUTTONDBLCLK : WM_RBUTTONDOWN; 707 WM_RBUTTONDBLCLK : WM_RBUTTONDOWN;
708 } else { 708 } else {
709 NOTREACHED(); 709 NOTREACHED();
710 return false; 710 return false;
711 } 711 }
712 OnMouseEvent(event, msg); 712 OnMouseEvent(event, msg);
713 return true; 713 return true;
714 } 714 }
715 715
716 bool LocationBarView::OnMouseDragged(const views::MouseEvent& event) { 716 bool LocationBarView::OnMouseDragged(const views::MouseEvent& event) {
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 template_url_model_ = NULL; 1222 template_url_model_ = NULL;
1223 ShowFirstRunBubble(bubble_type_); 1223 ShowFirstRunBubble(bubble_type_);
1224 } 1224 }
1225 1225
1226 #if defined(OS_WIN) 1226 #if defined(OS_WIN)
1227 bool LocationBarView::HasValidSuggestText() { 1227 bool LocationBarView::HasValidSuggestText() {
1228 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && 1228 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() &&
1229 !suggested_text_view_->GetText().empty(); 1229 !suggested_text_view_->GetText().empty();
1230 } 1230 }
1231 #endif 1231 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698