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

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

Issue 11091050: InstantExtended: Add js api for custom logo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.h ('k') | chrome/browser/ui/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) 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/browser_instant_controller.h" 5 #include "chrome/browser/ui/browser_instant_controller.h"
6 6
7 #include "chrome/browser/browser_shutdown.h" 7 #include "chrome/browser/browser_shutdown.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/instant/instant_controller.h" 9 #include "chrome/browser/instant/instant_controller.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 GURL url = preview->web_contents()->GetURL(); 89 GURL url = preview->web_contents()->GetURL();
90 DCHECK(browser_->profile()->GetExtensionService()); 90 DCHECK(browser_->profile()->GetExtensionService());
91 if (browser_->profile()->GetExtensionService()->IsInstalledApp(url)) { 91 if (browser_->profile()->GetExtensionService()->IsInstalledApp(url)) {
92 AppLauncherHandler::RecordAppLaunchType( 92 AppLauncherHandler::RecordAppLaunchType(
93 extension_misc::APP_LAUNCH_OMNIBOX_INSTANT); 93 extension_misc::APP_LAUNCH_OMNIBOX_INSTANT);
94 } 94 }
95 } 95 }
96 } 96 }
97 97
98 void BrowserInstantController::SetHasCustomLogo(bool has_logo) {
99 browser_->window()->SetInstantHasCustomLogo(has_logo);
samarth 2012/10/10 22:16:53 I agree with Sreeram that plumbing this through Br
100 }
101
98 void BrowserInstantController::SetSuggestedText( 102 void BrowserInstantController::SetSuggestedText(
99 const string16& text, 103 const string16& text,
100 InstantCompleteBehavior behavior) { 104 InstantCompleteBehavior behavior) {
101 if (browser_->window()->GetLocationBar()) 105 if (browser_->window()->GetLocationBar())
102 browser_->window()->GetLocationBar()->SetSuggestedText(text, behavior); 106 browser_->window()->GetLocationBar()->SetSuggestedText(text, behavior);
103 } 107 }
104 108
105 gfx::Rect BrowserInstantController::GetInstantBounds() { 109 gfx::Rect BrowserInstantController::GetInstantBounds() {
106 return browser_->window()->GetInstantBounds(); 110 return browser_->window()->GetInstantBounds();
107 } 111 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // BrowserInstantController, private: 154 // BrowserInstantController, private:
151 155
152 void BrowserInstantController::ResetInstant() { 156 void BrowserInstantController::ResetInstant() {
153 instant_.reset( 157 instant_.reset(
154 !browser_shutdown::ShuttingDownWithoutClosingBrowsers() && 158 !browser_shutdown::ShuttingDownWithoutClosingBrowsers() &&
155 browser_->is_type_tabbed() ? 159 browser_->is_type_tabbed() ?
156 InstantController::CreateInstant(browser_->profile(), this) : NULL); 160 InstantController::CreateInstant(browser_->profile(), this) : NULL);
157 } 161 }
158 162
159 } // namespace chrome 163 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.h ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698