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

Side by Side Diff: chrome/browser/chromeos/compact_navigation_bar.cc

Issue 194110: Convert the AutocompletePopupPositioner into a BubblePositioner in preparatio... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/chromeos/compact_navigation_bar.h" 5 #include "chrome/browser/chromeos/compact_navigation_bar.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "app/theme_provider.h" 9 #include "app/theme_provider.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 192 }
193 193
194 SkBitmap CompactNavigationBar::GetFavIcon() const { 194 SkBitmap CompactNavigationBar::GetFavIcon() const {
195 return SkBitmap(); 195 return SkBitmap();
196 } 196 }
197 197
198 std::wstring CompactNavigationBar::GetTitle() const { 198 std::wstring CompactNavigationBar::GetTitle() const {
199 return std::wstring(); 199 return std::wstring();
200 } 200 }
201 201
202 gfx::Rect CompactNavigationBar::GetPopupBounds() const { 202 gfx::Rect CompactNavigationBar::GetLocationStackBounds() const {
203 gfx::Point upper_left(0, height()); 203 gfx::Point origin;
204 ConvertPointToScreen(this, &upper_left); 204 ConvertPointToScreen(this, &origin);
205 return gfx::Rect(upper_left.x(), upper_left.y(), 700, 100); 205 return gfx::Rect(origin, size());
206 } 206 }
207 207
208 void CompactNavigationBar::AddTabWithURL(const GURL& url, 208 void CompactNavigationBar::AddTabWithURL(const GURL& url,
209 PageTransition::Type transition) { 209 PageTransition::Type transition) {
210 switch (StatusAreaView::GetOpenTabsMode()) { 210 switch (StatusAreaView::GetOpenTabsMode()) {
211 case StatusAreaView::OPEN_TABS_ON_LEFT: { 211 case StatusAreaView::OPEN_TABS_ON_LEFT: {
212 // Add the new tab at the first non-pinned location. 212 // Add the new tab at the first non-pinned location.
213 int index = browser_->tabstrip_model()->IndexOfFirstNonPinnedTab(); 213 int index = browser_->tabstrip_model()->IndexOfFirstNonPinnedTab();
214 browser_->AddTabWithURL(url, GURL(), transition, 214 browser_->AddTabWithURL(url, GURL(), transition,
215 true, index, true, NULL); 215 true, index, true, NULL);
216 break; 216 break;
217 } 217 }
218 case StatusAreaView::OPEN_TABS_CLOBBER: { 218 case StatusAreaView::OPEN_TABS_CLOBBER: {
219 browser_->GetSelectedTabContents()->controller().LoadURL( 219 browser_->GetSelectedTabContents()->controller().LoadURL(
220 url, GURL(), transition); 220 url, GURL(), transition);
221 break; 221 break;
222 } 222 }
223 case StatusAreaView::OPEN_TABS_ON_RIGHT: { 223 case StatusAreaView::OPEN_TABS_ON_RIGHT: {
224 browser_->AddTabWithURL(url, GURL(), transition, true, -1, true, NULL); 224 browser_->AddTabWithURL(url, GURL(), transition, true, -1, true, NULL);
225 break; 225 break;
226 } 226 }
227 } 227 }
228 } 228 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698