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

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

Issue 6012011: TabContentsViewViews should be used instead of TabContentsViewGtk for TOUCH_UI (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 12 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 | « no previous file | 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/views/find_bar_host.h" 5 #include "chrome/browser/views/find_bar_host.h"
6 6
7 #include "chrome/browser/tab_contents/tab_contents.h" 7 #include "chrome/browser/tab_contents/tab_contents.h"
8 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 8 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
9 #if defined(TOUCH_UI)
10 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h"
11 #endif
sadrul 2010/12/29 21:02:47 I think the conditional headers go below the gener
varunjain 2011/01/17 18:09:14 Done.
9 #include "chrome/browser/views/frame/browser_view.h" 12 #include "chrome/browser/views/frame/browser_view.h"
10 #include "chrome/browser/views/tab_contents/tab_contents_view_gtk.h" 13 #include "chrome/browser/views/tab_contents/tab_contents_view_gtk.h"
11 #include "views/widget/widget_gtk.h" 14 #include "views/widget/widget_gtk.h"
12 15
13 void FindBarHost::AudibleAlert() { 16 void FindBarHost::AudibleAlert() {
14 // TODO(davemoore) implement. 17 // TODO(davemoore) implement.
15 NOTIMPLEMENTED(); 18 NOTIMPLEMENTED();
16 } 19 }
17 20
18 void FindBarHost::GetWidgetPositionNative(gfx::Rect* avoid_overlapping_rect) { 21 void FindBarHost::GetWidgetPositionNative(gfx::Rect* avoid_overlapping_rect) {
19 gfx::Rect frame_rect, webcontents_rect; 22 gfx::Rect frame_rect, webcontents_rect;
20 host()->GetRootWidget()->GetBounds(&frame_rect, true); 23 host()->GetRootWidget()->GetBounds(&frame_rect, true);
21 TabContentsView* tab_view = find_bar_controller_->tab_contents()->view(); 24 TabContentsView* tab_view = find_bar_controller_->tab_contents()->view();
25 #if defined(TOUCH_UI)
26 webcontents_rect = static_cast<TabContentsViewViews*>(tab_view)->bounds();
27 #else
22 static_cast<TabContentsViewGtk*>(tab_view)->GetBounds(&webcontents_rect, 28 static_cast<TabContentsViewGtk*>(tab_view)->GetBounds(&webcontents_rect,
23 true); 29 true);
30 #endif
24 avoid_overlapping_rect->Offset(0, webcontents_rect.y() - frame_rect.y()); 31 avoid_overlapping_rect->Offset(0, webcontents_rect.y() - frame_rect.y());
25 } 32 }
26 33
27 bool FindBarHost::ShouldForwardKeystrokeToWebpageNative( 34 bool FindBarHost::ShouldForwardKeystrokeToWebpageNative(
28 const views::Textfield::Keystroke& key_stroke) { 35 const views::Textfield::Keystroke& key_stroke) {
29 return true; 36 return true;
30 } 37 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698