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

Side by Side Diff: chrome/browser/ui/views/find_bar_host.cc

Issue 7063003: Make FindBar obey dialog bounds for GTK. Will fix other platforms in separate patches. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switched to container_->allocation.width Created 9 years, 7 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/ui/views/find_bar_host.h ('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) 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/find_bar_host.h" 5 #include "chrome/browser/ui/views/find_bar_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 9 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
10 #include "chrome/browser/ui/find_bar/find_tab_helper.h" 10 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 222 }
223 223
224 string16 FindBarHost::GetFindSelectedText() { 224 string16 FindBarHost::GetFindSelectedText() {
225 return find_bar_view()->GetFindSelectedText(); 225 return find_bar_view()->GetFindSelectedText();
226 } 226 }
227 227
228 string16 FindBarHost::GetMatchCountText() { 228 string16 FindBarHost::GetMatchCountText() {
229 return find_bar_view()->GetMatchCountText(); 229 return find_bar_view()->GetMatchCountText();
230 } 230 }
231 231
232 int FindBarHost::GetWidth() {
233 NOTIMPLEMENTED();
234 return 0;
235 }
236
232 //////////////////////////////////////////////////////////////////////////////// 237 ////////////////////////////////////////////////////////////////////////////////
233 // Overridden from DropdownBarHost: 238 // Overridden from DropdownBarHost:
234 239
235 gfx::Rect FindBarHost::GetDialogPosition(gfx::Rect avoid_overlapping_rect) { 240 gfx::Rect FindBarHost::GetDialogPosition(gfx::Rect avoid_overlapping_rect) {
236 // Find the area we have to work with (after accounting for scrollbars, etc). 241 // Find the area we have to work with (after accounting for scrollbars, etc).
237 gfx::Rect widget_bounds; 242 gfx::Rect widget_bounds;
238 GetWidgetBounds(&widget_bounds); 243 GetWidgetBounds(&widget_bounds);
239 if (widget_bounds.IsEmpty()) 244 if (widget_bounds.IsEmpty())
240 return gfx::Rect(); 245 return gfx::Rect();
241 246
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 311
307 DropdownBarHost::UnregisterAccelerators(); 312 DropdownBarHost::UnregisterAccelerators();
308 } 313 }
309 314
310 //////////////////////////////////////////////////////////////////////////////// 315 ////////////////////////////////////////////////////////////////////////////////
311 // private: 316 // private:
312 317
313 FindBarView* FindBarHost::find_bar_view() { 318 FindBarView* FindBarHost::find_bar_view() {
314 return static_cast<FindBarView*>(view()); 319 return static_cast<FindBarView*>(view());
315 } 320 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/find_bar_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698