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

Side by Side Diff: chrome/browser/ui/gtk/find_bar_gtk.h

Issue 10166012: [Coverity] pass-by-ref instead of pass-by-val (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/find_bar_gtk.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_GTK_FIND_BAR_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_FIND_BAR_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_FIND_BAR_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_FIND_BAR_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 // Returns the rectangle representing where to position the find bar. If 98 // Returns the rectangle representing where to position the find bar. If
99 // |avoid_overlapping_rect| is specified, the return value will be a rectangle 99 // |avoid_overlapping_rect| is specified, the return value will be a rectangle
100 // located immediately to the left of |avoid_overlapping_rect|, as long as 100 // located immediately to the left of |avoid_overlapping_rect|, as long as
101 // there is enough room for the dialog to draw within the bounds. If not, the 101 // there is enough room for the dialog to draw within the bounds. If not, the
102 // dialog position returned will overlap |avoid_overlapping_rect|. 102 // dialog position returned will overlap |avoid_overlapping_rect|.
103 // Note: |avoid_overlapping_rect| is expected to use coordinates relative to 103 // Note: |avoid_overlapping_rect| is expected to use coordinates relative to
104 // the top of the page area, (it will be converted to coordinates relative to 104 // the top of the page area, (it will be converted to coordinates relative to
105 // the top of the browser window, when comparing against the dialog 105 // the top of the browser window, when comparing against the dialog
106 // coordinates). The returned value is relative to the browser window. 106 // coordinates). The returned value is relative to the browser window.
107 gfx::Rect GetDialogPosition(gfx::Rect avoid_overlapping_rect); 107 gfx::Rect GetDialogPosition(const gfx::Rect& avoid_overlapping_rect);
108 108
109 // Adjust the text alignment according to the text direction of the widget 109 // Adjust the text alignment according to the text direction of the widget
110 // and |text_entry_|'s content, to make sure the real text alignment is 110 // and |text_entry_|'s content, to make sure the real text alignment is
111 // always in sync with the UI language direction. 111 // always in sync with the UI language direction.
112 void AdjustTextAlignment(); 112 void AdjustTextAlignment();
113 113
114 // Get the position of the findbar within the floating container. 114 // Get the position of the findbar within the floating container.
115 gfx::Point GetPosition(); 115 gfx::Point GetPosition();
116 116
117 static void OnParentSet(GtkWidget* widget, GtkObject* old_parent, 117 static void OnParentSet(GtkWidget* widget, GtkObject* old_parent,
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 // The selection rect we are currently showing. We cache it to avoid covering 231 // The selection rect we are currently showing. We cache it to avoid covering
232 // it up. 232 // it up.
233 gfx::Rect selection_rect_; 233 gfx::Rect selection_rect_;
234 234
235 content::NotificationRegistrar registrar_; 235 content::NotificationRegistrar registrar_;
236 236
237 DISALLOW_COPY_AND_ASSIGN(FindBarGtk); 237 DISALLOW_COPY_AND_ASSIGN(FindBarGtk);
238 }; 238 };
239 239
240 #endif // CHROME_BROWSER_UI_GTK_FIND_BAR_GTK_H_ 240 #endif // CHROME_BROWSER_UI_GTK_FIND_BAR_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/find_bar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698