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

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

Issue 30993004: Reland: Implement features in NativeViewHostAura for scroll end effect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed outstanding issues from original CL Created 7 years, 2 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 22 matching lines...) Expand all
33 } // namespace chrome 33 } // namespace chrome
34 34
35 //////////////////////////////////////////////////////////////////////////////// 35 ////////////////////////////////////////////////////////////////////////////////
36 // FindBarHost, public: 36 // FindBarHost, public:
37 37
38 FindBarHost::FindBarHost(BrowserView* browser_view) 38 FindBarHost::FindBarHost(BrowserView* browser_view)
39 : DropdownBarHost(browser_view), 39 : DropdownBarHost(browser_view),
40 find_bar_controller_(NULL) { 40 find_bar_controller_(NULL) {
41 FindBarView* find_bar_view = new FindBarView(this); 41 FindBarView* find_bar_view = new FindBarView(this);
42 Init(browser_view->find_bar_host_view(), find_bar_view, find_bar_view); 42 Init(browser_view->find_bar_host_view(), find_bar_view, find_bar_view);
43 host()->StackAtTop();
sky 2013/10/22 19:57:32 Why do we need a stack at top now? And this won't
rharrison 2013/10/22 20:34:41 The content/clipping layers are being painted on t
sky 2013/10/22 21:32:19 See kHostViewKey. I suspect you need to adjust sta
rharrison 2013/10/24 14:40:15 Done.
43 } 44 }
44 45
45 FindBarHost::~FindBarHost() { 46 FindBarHost::~FindBarHost() {
46 } 47 }
47 48
48 bool FindBarHost::MaybeForwardKeyEventToWebpage( 49 bool FindBarHost::MaybeForwardKeyEventToWebpage(
49 const ui::KeyEvent& key_event) { 50 const ui::KeyEvent& key_event) {
50 if (!ShouldForwardKeyEventToWebpageNative(key_event)) { 51 if (!ShouldForwardKeyEventToWebpageNative(key_event)) {
51 // Native implementation says not to forward these events. 52 // Native implementation says not to forward these events.
52 return false; 53 return false;
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 //////////////////////////////////////////////////////////////////////////////// 365 ////////////////////////////////////////////////////////////////////////////////
365 // private: 366 // private:
366 367
367 void FindBarHost::GetWidgetPositionNative(gfx::Rect* avoid_overlapping_rect) { 368 void FindBarHost::GetWidgetPositionNative(gfx::Rect* avoid_overlapping_rect) {
368 gfx::Rect frame_rect = host()->GetTopLevelWidget()->GetWindowBoundsInScreen(); 369 gfx::Rect frame_rect = host()->GetTopLevelWidget()->GetWindowBoundsInScreen();
369 content::WebContentsView* tab_view = 370 content::WebContentsView* tab_view =
370 find_bar_controller_->web_contents()->GetView(); 371 find_bar_controller_->web_contents()->GetView();
371 gfx::Rect webcontents_rect = tab_view->GetViewBounds(); 372 gfx::Rect webcontents_rect = tab_view->GetViewBounds();
372 avoid_overlapping_rect->Offset(0, webcontents_rect.y() - frame_rect.y()); 373 avoid_overlapping_rect->Offset(0, webcontents_rect.y() - frame_rect.y());
373 } 374 }
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/native/native_view_host.h » ('j') | ui/views/controls/native/native_view_host_aura.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698