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

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

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/gtk/find_bar_gtk.cc ('k') | chrome/browser/ui/views/find_bar_host.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) 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 #ifndef CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_
6 #define CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/ui/find_bar/find_bar.h" 9 #include "chrome/browser/ui/find_bar/find_bar.h"
10 #include "chrome/browser/ui/views/dropdown_bar_host.h" 10 #include "chrome/browser/ui/views/dropdown_bar_host.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 // Overridden from views::AcceleratorTarget in DropdownBarHost class: 67 // Overridden from views::AcceleratorTarget in DropdownBarHost class:
68 virtual bool AcceleratorPressed(const views::Accelerator& accelerator); 68 virtual bool AcceleratorPressed(const views::Accelerator& accelerator);
69 69
70 // FindBarTesting implementation: 70 // FindBarTesting implementation:
71 virtual bool GetFindBarWindowInfo(gfx::Point* position, 71 virtual bool GetFindBarWindowInfo(gfx::Point* position,
72 bool* fully_visible); 72 bool* fully_visible);
73 virtual string16 GetFindText(); 73 virtual string16 GetFindText();
74 virtual string16 GetFindSelectedText(); 74 virtual string16 GetFindSelectedText();
75 virtual string16 GetMatchCountText(); 75 virtual string16 GetMatchCountText();
76 virtual int GetWidth();
76 77
77 // Overridden from DropdownBarHost: 78 // Overridden from DropdownBarHost:
78 // Returns the rectangle representing where to position the find bar. It uses 79 // Returns the rectangle representing where to position the find bar. It uses
79 // GetDialogBounds and positions itself within that, either to the left (if an 80 // GetDialogBounds and positions itself within that, either to the left (if an
80 // InfoBar is present) or to the right (no InfoBar). If 81 // InfoBar is present) or to the right (no InfoBar). If
81 // |avoid_overlapping_rect| is specified, the return value will be a rectangle 82 // |avoid_overlapping_rect| is specified, the return value will be a rectangle
82 // located immediately to the left of |avoid_overlapping_rect|, as long as 83 // located immediately to the left of |avoid_overlapping_rect|, as long as
83 // there is enough room for the dialog to draw within the bounds. If not, the 84 // there is enough room for the dialog to draw within the bounds. If not, the
84 // dialog position returned will overlap |avoid_overlapping_rect|. 85 // dialog position returned will overlap |avoid_overlapping_rect|.
85 // Note: |avoid_overlapping_rect| is expected to use coordinates relative to 86 // Note: |avoid_overlapping_rect| is expected to use coordinates relative to
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // Returns the FindBarView. 123 // Returns the FindBarView.
123 FindBarView* find_bar_view(); 124 FindBarView* find_bar_view();
124 125
125 // A pointer back to the owning controller. 126 // A pointer back to the owning controller.
126 FindBarController* find_bar_controller_; 127 FindBarController* find_bar_controller_;
127 128
128 DISALLOW_COPY_AND_ASSIGN(FindBarHost); 129 DISALLOW_COPY_AND_ASSIGN(FindBarHost);
129 }; 130 };
130 131
131 #endif // CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_ 132 #endif // CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/find_bar_gtk.cc ('k') | chrome/browser/ui/views/find_bar_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698