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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 110413007: Fix truncated location bar on maximized streamlined hosted apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar/toolbar_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/location_bar/location_bar_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 282
283 const SkColor background_color = 283 const SkColor background_color =
284 GetColor(ToolbarModel::NONE, LocationBarView::BACKGROUND); 284 GetColor(ToolbarModel::NONE, LocationBarView::BACKGROUND);
285 ev_bubble_view_ = new EVBubbleView( 285 ev_bubble_view_ = new EVBubbleView(
286 bubble_font_list, GetColor(ToolbarModel::EV_SECURE, SECURITY_TEXT), 286 bubble_font_list, GetColor(ToolbarModel::EV_SECURE, SECURITY_TEXT),
287 background_color, this); 287 background_color, this);
288 ev_bubble_view_->set_drag_controller(this); 288 ev_bubble_view_->set_drag_controller(this);
289 AddChildView(ev_bubble_view_); 289 AddChildView(ev_bubble_view_);
290 290
291 // Initialize the Omnibox view. 291 // Initialize the Omnibox view.
292 omnibox_view_ = new OmniboxViewViews(this, profile(), command_updater(), 292 omnibox_view_ = new OmniboxViewViews(
293 is_popup_mode_, this, font_list); 293 this, profile(), command_updater(),
294 is_popup_mode_ ||
295 (browser_->is_app() && CommandLine::ForCurrentProcess()->
296 HasSwitch(switches::kEnableStreamlinedHostedApps)),
297 this, font_list);
294 omnibox_view_->Init(); 298 omnibox_view_->Init();
295 omnibox_view_->SetFocusable(true); 299 omnibox_view_->SetFocusable(true);
296 AddChildView(omnibox_view_); 300 AddChildView(omnibox_view_);
297 301
298 // Initialize the inline autocomplete view which is visible only when IME is 302 // Initialize the inline autocomplete view which is visible only when IME is
299 // turned on. Use the same font with the omnibox and highlighted background. 303 // turned on. Use the same font with the omnibox and highlighted background.
300 ime_inline_autocomplete_view_ = new views::Label(base::string16(), font_list); 304 ime_inline_autocomplete_view_ = new views::Label(base::string16(), font_list);
301 ime_inline_autocomplete_view_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 305 ime_inline_autocomplete_view_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
302 ime_inline_autocomplete_view_->SetAutoColorReadabilityEnabled(false); 306 ime_inline_autocomplete_view_->SetAutoColorReadabilityEnabled(false);
303 ime_inline_autocomplete_view_->set_background( 307 ime_inline_autocomplete_view_->set_background(
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 bounds.Inset(-(horizontal_padding + 1) / 2, 0); 1586 bounds.Inset(-(horizontal_padding + 1) / 2, 0);
1583 location_bar_util::PaintExtensionActionBackground( 1587 location_bar_util::PaintExtensionActionBackground(
1584 *(*page_action_view)->image_view()->page_action(), 1588 *(*page_action_view)->image_view()->page_action(),
1585 tab_id, canvas, bounds, text_color, background_color); 1589 tab_id, canvas, bounds, text_color, background_color);
1586 } 1590 }
1587 } 1591 }
1588 1592
1589 void LocationBarView::AccessibilitySetValue(const base::string16& new_value) { 1593 void LocationBarView::AccessibilitySetValue(const base::string16& new_value) {
1590 omnibox_view_->SetUserText(new_value, new_value, true); 1594 omnibox_view_->SetUserText(new_value, new_value, true);
1591 } 1595 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698