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

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

Issue 126137: Part 1 of merging Extensions and DOMUI (Closed)
Patch Set: add test and rebase Created 11 years, 5 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/dom_ui/dom_ui.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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 #include "app/animation.h" 7 #include "app/animation.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/idle_timer.h" 10 #include "base/idle_timer.h"
(...skipping 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 // the focus. FocusLocationBar() is only reached when the location bar is 1899 // the focus. FocusLocationBar() is only reached when the location bar is
1900 // focusable, but this may be reached at other times, e.g. while in 1900 // focusable, but this may be reached at other times, e.g. while in
1901 // fullscreen mode, where we need to leave focus in a consistent state. 1901 // fullscreen mode, where we need to leave focus in a consistent state.
1902 window_->SetFocusToLocationBar(); 1902 window_->SetFocusToLocationBar();
1903 } 1903 }
1904 1904
1905 void Browser::RenderWidgetShowing() { 1905 void Browser::RenderWidgetShowing() {
1906 window_->DisableInactiveFrame(); 1906 window_->DisableInactiveFrame();
1907 } 1907 }
1908 1908
1909 ExtensionFunctionDispatcher* Browser::CreateExtensionFunctionDispatcher(
1910 RenderViewHost* render_view_host,
1911 const std::string& extension_id) {
1912 return new ExtensionFunctionDispatcher(render_view_host, this, extension_id);
1913 }
1914
1915 int Browser::GetExtraRenderViewHeight() const { 1909 int Browser::GetExtraRenderViewHeight() const {
1916 return window_->GetExtraRenderViewHeight(); 1910 return window_->GetExtraRenderViewHeight();
1917 } 1911 }
1918 1912
1919 void Browser::OnStartDownload(DownloadItem* download) { 1913 void Browser::OnStartDownload(DownloadItem* download) {
1920 if (!window()) 1914 if (!window())
1921 return; 1915 return;
1922 1916
1923 // GetDownloadShelf creates the download shelf if it was not yet created. 1917 // GetDownloadShelf creates the download shelf if it was not yet created.
1924 window()->GetDownloadShelf()->AddDownload(new DownloadItemModel(download)); 1918 window()->GetDownloadShelf()->AddDownload(new DownloadItemModel(download));
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
2711 /////////////////////////////////////////////////////////////////////////////// 2705 ///////////////////////////////////////////////////////////////////////////////
2712 // BrowserToolbarModel (private): 2706 // BrowserToolbarModel (private):
2713 2707
2714 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { 2708 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() {
2715 // This |current_tab| can be NULL during the initialization of the 2709 // This |current_tab| can be NULL during the initialization of the
2716 // toolbar during window creation (i.e. before any tabs have been added 2710 // toolbar during window creation (i.e. before any tabs have been added
2717 // to the window). 2711 // to the window).
2718 TabContents* current_tab = browser_->GetSelectedTabContents(); 2712 TabContents* current_tab = browser_->GetSelectedTabContents();
2719 return current_tab ? &current_tab->controller() : NULL; 2713 return current_tab ? &current_tab->controller() : NULL;
2720 } 2714 }
OLDNEW
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/dom_ui/dom_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698