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

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

Issue 664703003: Stash: hacks to get MacViews chrome browser window working (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years 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
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_DROPDOWN_BAR_HOST_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_
6 #define CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_ 6 #define CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/browser/native_web_keyboard_event.h" 10 #include "content/public/browser/native_web_keyboard_event.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // Returns the animation offset. 135 // Returns the animation offset.
136 int animation_offset() const { return animation_offset_; } 136 int animation_offset() const { return animation_offset_; }
137 137
138 // Retrieves the boundary that the dropdown widget has to work with 138 // Retrieves the boundary that the dropdown widget has to work with
139 // within the Chrome frame window. The boundary differs depending on 139 // within the Chrome frame window. The boundary differs depending on
140 // the dropdown bar implementation. The default implementation 140 // the dropdown bar implementation. The default implementation
141 // returns the boundary of browser_view and the drop down 141 // returns the boundary of browser_view and the drop down
142 // can be shown in any client area. 142 // can be shown in any client area.
143 virtual void GetWidgetBounds(gfx::Rect* bounds); 143 virtual void GetWidgetBounds(gfx::Rect* bounds);
144 144
145 // Allows implementation to tweak widget position.
146 void SetWidgetPositionNative(const gfx::Rect& new_pos, bool no_redraw);
147
148 // Returns the animation for the dropdown. 145 // Returns the animation for the dropdown.
149 gfx::SlideAnimation* animation() { 146 gfx::SlideAnimation* animation() {
150 return animation_.get(); 147 return animation_.get();
151 } 148 }
152 149
153 private: 150 private:
154 // Set the view whose position in the |browser_view_| view hierarchy 151 // Set the view whose position in the |browser_view_| view hierarchy
155 // determines the z-order of |host_| relative to views with layers and 152 // determines the z-order of |host_| relative to views with layers and
156 // views with associated NativeViews. 153 // views with associated NativeViews.
157 void SetHostViewNative(views::View* host_view); 154 void SetHostViewNative(views::View* host_view);
(...skipping 28 matching lines...) Expand all
186 scoped_ptr<views::Widget> host_; 183 scoped_ptr<views::Widget> host_;
187 184
188 // A flag to manually manage visibility. GTK/X11 is asynchronous and 185 // A flag to manually manage visibility. GTK/X11 is asynchronous and
189 // the state of the widget can be out of sync. 186 // the state of the widget can be out of sync.
190 bool is_visible_; 187 bool is_visible_;
191 188
192 DISALLOW_COPY_AND_ASSIGN(DropdownBarHost); 189 DISALLOW_COPY_AND_ASSIGN(DropdownBarHost);
193 }; 190 };
194 191
195 #endif // CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_ 192 #endif // CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/collected_cookies_views.cc ('k') | chrome/browser/ui/views/dropdown_bar_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698