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

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

Issue 6881107: Rework the way Widget::Init works: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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) 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 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/common/native_web_keyboard_event.h" 10 #include "content/common/native_web_keyboard_event.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 // The find bar widget needs rounded edges, so we create a polygon 130 // The find bar widget needs rounded edges, so we create a polygon
131 // that corresponds to the background images for this window (and 131 // that corresponds to the background images for this window (and
132 // make the polygon only contain the pixels that we want to 132 // make the polygon only contain the pixels that we want to
133 // draw). The polygon is then given to SetWindowRgn which changes 133 // draw). The polygon is then given to SetWindowRgn which changes
134 // the window from being a rectangle in shape, to being a rect with 134 // the window from being a rectangle in shape, to being a rect with
135 // curved edges. We also check to see if the region should be 135 // curved edges. We also check to see if the region should be
136 // truncated to prevent from drawing onto Chrome's window border. 136 // truncated to prevent from drawing onto Chrome's window border.
137 void UpdateWindowEdges(const gfx::Rect& new_pos); 137 void UpdateWindowEdges(const gfx::Rect& new_pos);
138 138
139 // Creates and returns the native Widget.
140 views::Widget* CreateHost();
141
142 // Allows implementation to tweak widget position. 139 // Allows implementation to tweak widget position.
143 void SetWidgetPositionNative(const gfx::Rect& new_pos, bool no_redraw); 140 void SetWidgetPositionNative(const gfx::Rect& new_pos, bool no_redraw);
144 141
145 // Returns a keyboard event suitable for forwarding. 142 // Returns a keyboard event suitable for forwarding.
146 NativeWebKeyboardEvent GetKeyboardEvent( 143 NativeWebKeyboardEvent GetKeyboardEvent(
147 const TabContents* contents, 144 const TabContents* contents,
148 const views::KeyEvent& key_event); 145 const views::KeyEvent& key_event);
149 146
150 // Returns the animation for the dropdown. 147 // Returns the animation for the dropdown.
151 ui::SlideAnimation* animation() { 148 ui::SlideAnimation* animation() {
(...skipping 30 matching lines...) Expand all
182 scoped_ptr<views::Widget> host_; 179 scoped_ptr<views::Widget> host_;
183 180
184 // A flag to manually manage visibility. GTK/X11 is asynchronous and 181 // A flag to manually manage visibility. GTK/X11 is asynchronous and
185 // the state of the widget can be out of sync. 182 // the state of the widget can be out of sync.
186 bool is_visible_; 183 bool is_visible_;
187 184
188 DISALLOW_COPY_AND_ASSIGN(DropdownBarHost); 185 DISALLOW_COPY_AND_ASSIGN(DropdownBarHost);
189 }; 186 };
190 187
191 #endif // CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_ 188 #endif // CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/download/download_started_animation_win.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