OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/toolbar_view.h" | 5 #include "chrome/browser/views/toolbar_view.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "chrome/app/chrome_dll_resource.h" | 9 #include "chrome/app/chrome_dll_resource.h" |
10 #include "chrome/browser/browser.h" | 10 #include "chrome/browser/browser.h" |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 upgrade_reminder_pulse_timer_.Stop(); | 263 upgrade_reminder_pulse_timer_.Stop(); |
264 } | 264 } |
265 | 265 |
266 //////////////////////////////////////////////////////////////////////////////// | 266 //////////////////////////////////////////////////////////////////////////////// |
267 // ToolbarView, LocationBarView::Delegate implementation: | 267 // ToolbarView, LocationBarView::Delegate implementation: |
268 | 268 |
269 TabContents* ToolbarView::GetTabContents() { | 269 TabContents* ToolbarView::GetTabContents() { |
270 return browser_->GetSelectedTabContents(); | 270 return browser_->GetSelectedTabContents(); |
271 } | 271 } |
272 | 272 |
| 273 MatchPreview* ToolbarView::GetMatchPreview() { |
| 274 return browser_->match_preview(); |
| 275 } |
| 276 |
273 void ToolbarView::OnInputInProgress(bool in_progress) { | 277 void ToolbarView::OnInputInProgress(bool in_progress) { |
274 // The edit should make sure we're only notified when something changes. | 278 // The edit should make sure we're only notified when something changes. |
275 DCHECK(model_->input_in_progress() != in_progress); | 279 DCHECK(model_->input_in_progress() != in_progress); |
276 | 280 |
277 model_->set_input_in_progress(in_progress); | 281 model_->set_input_in_progress(in_progress); |
278 location_bar_->Update(NULL); | 282 location_bar_->Update(NULL); |
279 } | 283 } |
280 | 284 |
281 //////////////////////////////////////////////////////////////////////////////// | 285 //////////////////////////////////////////////////////////////////////////////// |
282 // ToolbarView, AnimationDelegate implementation: | 286 // ToolbarView, AnimationDelegate implementation: |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 *tp->GetBitmapNamed(IDR_UPGRADE_DOT_ACTIVE), | 623 *tp->GetBitmapNamed(IDR_UPGRADE_DOT_ACTIVE), |
620 value); | 624 value); |
621 } | 625 } |
622 | 626 |
623 static const int kBadgeLeftSpacing = 8; | 627 static const int kBadgeLeftSpacing = 8; |
624 static const int kBadgeTopSpacing = 18; | 628 static const int kBadgeTopSpacing = 18; |
625 canvas->DrawBitmapInt(badge, kBadgeLeftSpacing, kBadgeTopSpacing); | 629 canvas->DrawBitmapInt(badge, kBadgeLeftSpacing, kBadgeTopSpacing); |
626 | 630 |
627 return canvas->ExtractBitmap(); | 631 return canvas->ExtractBitmap(); |
628 } | 632 } |
OLD | NEW |