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

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

Issue 3417011: Makes match preview send the dimensions of the omnibox to the page. (Closed)
Patch Set: Fix unittest Created 10 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
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/browser_window.h » ('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) 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/browser.h" 5 #include "chrome/browser/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 3270 matching lines...) Expand 10 before | Expand all | Expand 10 after
3281 // TabStripModel takes ownership of preview_contents. 3281 // TabStripModel takes ownership of preview_contents.
3282 tabstrip_model_->ReplaceTabContentsAt( 3282 tabstrip_model_->ReplaceTabContentsAt(
3283 index, preview_contents.release(), 3283 index, preview_contents.release(),
3284 TabStripModelObserver::REPLACE_MATCH_PREVIEW); 3284 TabStripModelObserver::REPLACE_MATCH_PREVIEW);
3285 } 3285 }
3286 3286
3287 void Browser::SetSuggestedText(const string16& text) { 3287 void Browser::SetSuggestedText(const string16& text) {
3288 window()->GetLocationBar()->SetSuggestedText(text); 3288 window()->GetLocationBar()->SetSuggestedText(text);
3289 } 3289 }
3290 3290
3291 gfx::Rect Browser::GetMatchPreviewBounds() {
3292 return window()->GetMatchPreviewBounds();
3293 }
3294
3291 /////////////////////////////////////////////////////////////////////////////// 3295 ///////////////////////////////////////////////////////////////////////////////
3292 // Browser, Command and state updating (private): 3296 // Browser, Command and state updating (private):
3293 3297
3294 void Browser::InitCommandState() { 3298 void Browser::InitCommandState() {
3295 // All browser commands whose state isn't set automagically some other way 3299 // All browser commands whose state isn't set automagically some other way
3296 // (like Back & Forward with initial page load) must have their state 3300 // (like Back & Forward with initial page load) must have their state
3297 // initialized here, otherwise they will be forever disabled. 3301 // initialized here, otherwise they will be forever disabled.
3298 3302
3299 // Navigation commands 3303 // Navigation commands
3300 command_updater_.UpdateCommandEnabled(IDC_RELOAD, true); 3304 command_updater_.UpdateCommandEnabled(IDC_RELOAD, true);
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
4137 } 4141 }
4138 4142
4139 void Browser::TabRestoreServiceDestroyed(TabRestoreService* service) { 4143 void Browser::TabRestoreServiceDestroyed(TabRestoreService* service) {
4140 if (!tab_restore_service_) 4144 if (!tab_restore_service_)
4141 return; 4145 return;
4142 4146
4143 DCHECK_EQ(tab_restore_service_, service); 4147 DCHECK_EQ(tab_restore_service_, service);
4144 tab_restore_service_->RemoveObserver(this); 4148 tab_restore_service_->RemoveObserver(this);
4145 tab_restore_service_ = NULL; 4149 tab_restore_service_ = NULL;
4146 } 4150 }
OLDNEW
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698