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

Side by Side Diff: chrome/browser/ui/gtk/location_bar_view_gtk.cc

Issue 6685002: Wires up ability for page to specify instant auto complete (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test and stray char Created 9 years, 9 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 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" 5 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 } 576 }
577 577
578 void LocationBarViewGtk::ShowFirstRunBubble(FirstRun::BubbleType bubble_type) { 578 void LocationBarViewGtk::ShowFirstRunBubble(FirstRun::BubbleType bubble_type) {
579 // We need the browser window to be shown before we can show the bubble, but 579 // We need the browser window to be shown before we can show the bubble, but
580 // we get called before that's happened. 580 // we get called before that's happened.
581 Task* task = first_run_bubble_.NewRunnableMethod( 581 Task* task = first_run_bubble_.NewRunnableMethod(
582 &LocationBarViewGtk::ShowFirstRunBubbleInternal, bubble_type); 582 &LocationBarViewGtk::ShowFirstRunBubbleInternal, bubble_type);
583 MessageLoop::current()->PostTask(FROM_HERE, task); 583 MessageLoop::current()->PostTask(FROM_HERE, task);
584 } 584 }
585 585
586 void LocationBarViewGtk::SetSuggestedText(const string16& text) { 586 void LocationBarViewGtk::SetSuggestedText(const string16& text,
587 location_entry_->model()->SetSuggestedText(text); 587 InstantCompleteBehavior behavior) {
588 location_entry_->model()->SetSuggestedText(text, behavior);
588 } 589 }
589 590
590 std::wstring LocationBarViewGtk::GetInputString() const { 591 std::wstring LocationBarViewGtk::GetInputString() const {
591 return location_input_; 592 return location_input_;
592 } 593 }
593 594
594 WindowOpenDisposition LocationBarViewGtk::GetWindowOpenDisposition() const { 595 WindowOpenDisposition LocationBarViewGtk::GetWindowOpenDisposition() const {
595 return disposition_; 596 return disposition_;
596 } 597 }
597 598
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 1633
1633 std::string badge_text = page_action_->GetBadgeText(tab_id); 1634 std::string badge_text = page_action_->GetBadgeText(tab_id);
1634 if (badge_text.empty()) 1635 if (badge_text.empty())
1635 return FALSE; 1636 return FALSE;
1636 1637
1637 gfx::CanvasSkiaPaint canvas(event, false); 1638 gfx::CanvasSkiaPaint canvas(event, false);
1638 gfx::Rect bounding_rect(widget->allocation); 1639 gfx::Rect bounding_rect(widget->allocation);
1639 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); 1640 page_action_->PaintBadge(&canvas, bounding_rect, tab_id);
1640 return FALSE; 1641 return FALSE;
1641 } 1642 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698