summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r--chrome/browser/autocomplete/autocomplete.h4
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.h4
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view.h4
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view.h8
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc8
5 files changed, 17 insertions, 11 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.h b/chrome/browser/autocomplete/autocomplete.h
index b3ed20b..4e96102 100644
--- a/chrome/browser/autocomplete/autocomplete.h
+++ b/chrome/browser/autocomplete/autocomplete.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -466,6 +466,8 @@ class AutocompleteProvider
// them all again when this is called anyway, so such a parameter wouldn't
// actually be useful.
virtual void OnProviderUpdate(bool updated_matches) = 0;
+ protected:
+ ~ACProviderListener() {}
};
AutocompleteProvider(ACProviderListener* listener,
diff --git a/chrome/browser/autocomplete/autocomplete_edit.h b/chrome/browser/autocomplete/autocomplete_edit.h
index efe5c9a..8567c62 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.h
+++ b/chrome/browser/autocomplete/autocomplete_edit.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -51,6 +51,8 @@ class AutocompleteEditController {
// Returns the title of the current page.
virtual std::wstring GetTitle() const = 0;
+ protected:
+ ~AutocompleteEditController() {}
};
class AutocompleteEditModel {
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view.h b/chrome/browser/autocomplete/autocomplete_edit_view.h
index 928d7e4..ea3988a 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -125,6 +125,8 @@ class AutocompleteEditView {
// Returns the gfx::NativeView of the edit view.
virtual gfx::NativeView GetNativeView() const = 0;
+ protected:
+ ~AutocompleteEditView() {}
};
#endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_H_
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view.h b/chrome/browser/autocomplete/autocomplete_popup_view.h
index 344ab9c..d1977ae 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view.h
+++ b/chrome/browser/autocomplete/autocomplete_popup_view.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -29,17 +29,17 @@ class Profile;
// bounds for the autocomplete popup view.
class AutocompletePopupPositioner {
public:
- virtual ~AutocompletePopupPositioner() { }
-
// Returns the bounds at which the popup should be shown, in screen
// coordinates. The height is ignored, since the popup is sized to its
// contents automatically.
virtual gfx::Rect GetPopupBounds() const = 0;
+ protected:
+ ~AutocompletePopupPositioner() {}
};
class AutocompletePopupView {
public:
- virtual ~AutocompletePopupView() { }
+ virtual ~AutocompletePopupView() {}
// Returns true if the popup is currently open.
virtual bool IsOpen() const = 0;
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
index dffc91a..d657a62 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
@@ -364,7 +364,7 @@ void AutocompletePopupViewGtk::AcceptLine(size_t line,
gboolean AutocompletePopupViewGtk::HandleMotion(GtkWidget* widget,
GdkEventMotion* event) {
// TODO(deanm): Windows has a bunch of complicated logic here.
- size_t line = LineFromY(event->y);
+ size_t line = LineFromY(static_cast<int>(event->y));
// There is both a hovered and selected line, hovered just means your mouse
// is over it, but selected is what's showing in the location edit.
model_->SetHoveredLine(line);
@@ -377,7 +377,7 @@ gboolean AutocompletePopupViewGtk::HandleMotion(GtkWidget* widget,
gboolean AutocompletePopupViewGtk::HandleButtonPress(GtkWidget* widget,
GdkEventButton* event) {
// Very similar to HandleMotion.
- size_t line = LineFromY(event->y);
+ size_t line = LineFromY(static_cast<int>(event->y));
model_->SetHoveredLine(line);
if (event->button == 1)
model_->SetSelectedLine(line, false);
@@ -386,7 +386,7 @@ gboolean AutocompletePopupViewGtk::HandleButtonPress(GtkWidget* widget,
gboolean AutocompletePopupViewGtk::HandleButtonRelease(GtkWidget* widget,
GdkEventButton* event) {
- size_t line = LineFromY(event->y);
+ size_t line = LineFromY(static_cast<int>(event->y));
switch (event->button) {
case 1: // Left click.
AcceptLine(line, CURRENT_TAB);
@@ -465,7 +465,7 @@ gboolean AutocompletePopupViewGtk::HandleExpose(GtkWidget* widget,
bool has_description = !match.description.empty();
int text_width = window_rect.width() - (kIconAreaWidth + kRightPadding);
int allocated_content_width = has_description ?
- text_width * kContentWidthPercentage : text_width;
+ static_cast<int>(text_width * kContentWidthPercentage) : text_width;
pango_layout_set_width(layout_, allocated_content_width * PANGO_SCALE);
// Note: We force to URL to LTR for all text directions.