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

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

Issue 9600036: Move Render(View|Widget)Host and associated classes to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 years, 9 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
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 #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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 break; 62 break;
63 // Fall through. 63 // Fall through.
64 default: 64 default:
65 return false; 65 return false;
66 } 66 }
67 67
68 TabContentsWrapper* contents = find_bar_controller_->tab_contents(); 68 TabContentsWrapper* contents = find_bar_controller_->tab_contents();
69 if (!contents) 69 if (!contents)
70 return false; 70 return false;
71 71
72 RenderViewHost* render_view_host = 72 content::RenderViewHost* render_view_host =
73 contents->web_contents()->GetRenderViewHost(); 73 contents->web_contents()->GetRenderViewHost();
74 74
75 // Make sure we don't have a text field element interfering with keyboard 75 // Make sure we don't have a text field element interfering with keyboard
76 // input. Otherwise Up and Down arrow key strokes get eaten. "Nom Nom Nom". 76 // input. Otherwise Up and Down arrow key strokes get eaten. "Nom Nom Nom".
77 render_view_host->ClearFocusedNode(); 77 render_view_host->ClearFocusedNode();
78 NativeWebKeyboardEvent event = GetKeyboardEvent(contents->web_contents(), 78 NativeWebKeyboardEvent event = GetKeyboardEvent(contents->web_contents(),
79 key_event); 79 key_event);
80 render_view_host->ForwardKeyboardEvent(event); 80 render_view_host->ForwardKeyboardEvent(event);
81 return true; 81 return true;
82 } 82 }
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 content::WebContentsView* tab_view = 330 content::WebContentsView* tab_view =
331 find_bar_controller_->tab_contents()->web_contents()->GetView(); 331 find_bar_controller_->tab_contents()->web_contents()->GetView();
332 gfx::Rect webcontents_rect; 332 gfx::Rect webcontents_rect;
333 tab_view->GetViewBounds(&webcontents_rect); 333 tab_view->GetViewBounds(&webcontents_rect);
334 avoid_overlapping_rect->Offset(0, webcontents_rect.y() - frame_rect.y()); 334 avoid_overlapping_rect->Offset(0, webcontents_rect.y() - frame_rect.y());
335 } 335 }
336 336
337 FindBarView* FindBarHost::find_bar_view() { 337 FindBarView* FindBarHost::find_bar_view() {
338 return static_cast<FindBarView*>(view()); 338 return static_cast<FindBarView*>(view());
339 } 339 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_view.cc ('k') | chrome/browser/ui/views/html_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698