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

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

Issue 53096: Broadcast a state change notification from the toolbar to the RenderWidgetHos... (Closed) Base URL: svn://chrome-svn/chrome/branches/release_154.next/src/
Patch Set: Created 11 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
« no previous file with comments | « chrome/app/theme/theme_resources.rc ('k') | chrome/browser/controller.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-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <commdlg.h> 7 #include <commdlg.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include "base/file_version_info.h" 10 #include "base/file_version_info.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 /////////////////////////////////////////////////////////////////////////////// 45 ///////////////////////////////////////////////////////////////////////////////
46 // Event handling and updating 46 // Event handling and updating
47 // 47 //
48 void Browser::InitCommandState() { 48 void Browser::InitCommandState() {
49 // All browser commands whose state isn't set automagically some other way 49 // All browser commands whose state isn't set automagically some other way
50 // (like Back & Forward with initial page load) must have their state 50 // (like Back & Forward with initial page load) must have their state
51 // initialized here, otherwise they will be forever disabled. 51 // initialized here, otherwise they will be forever disabled.
52 52
53 controller_.UpdateCommandEnabled(IDC_STOP, true); 53 controller_.UpdateCommandEnabled(IDC_STOP, true);
54 controller_.UpdateCommandEnabled(IDC_RELOAD, true); 54 controller_.UpdateCommandEnabled(IDC_RELOAD, true);
55 controller_.UpdateCommandEnabled(IDC_THREEDEE, true);
55 controller_.UpdateCommandEnabled(IDC_HOME, 56 controller_.UpdateCommandEnabled(IDC_HOME,
56 GetType() == BrowserType::TABBED_BROWSER); 57 GetType() == BrowserType::TABBED_BROWSER);
57 controller_.UpdateCommandEnabled(IDC_GO, true); 58 controller_.UpdateCommandEnabled(IDC_GO, true);
58 controller_.UpdateCommandEnabled(IDC_NEWTAB, true); 59 controller_.UpdateCommandEnabled(IDC_NEWTAB, true);
59 controller_.UpdateCommandEnabled(IDC_CLOSETAB, true); 60 controller_.UpdateCommandEnabled(IDC_CLOSETAB, true);
60 controller_.UpdateCommandEnabled(IDC_NEWWINDOW, true); 61 controller_.UpdateCommandEnabled(IDC_NEWWINDOW, true);
61 controller_.UpdateCommandEnabled(IDC_CLOSEWINDOW, true); 62 controller_.UpdateCommandEnabled(IDC_CLOSEWINDOW, true);
62 controller_.UpdateCommandEnabled(IDC_FOCUS_LOCATION, true); 63 controller_.UpdateCommandEnabled(IDC_FOCUS_LOCATION, true);
63 controller_.UpdateCommandEnabled(IDC_FOCUS_SEARCH, true); 64 controller_.UpdateCommandEnabled(IDC_FOCUS_SEARCH, true);
64 controller_.UpdateCommandEnabled(IDC_FOCUS_TOOLBAR, true); 65 controller_.UpdateCommandEnabled(IDC_FOCUS_TOOLBAR, true);
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 1075
1075 //////////////////////////////////////////////////////////////////////////////// 1076 ////////////////////////////////////////////////////////////////////////////////
1076 // Browser, SelectFileDialog::Listener implementation: 1077 // Browser, SelectFileDialog::Listener implementation:
1077 1078
1078 void Browser::FileSelected(const std::wstring& path, void* params) { 1079 void Browser::FileSelected(const std::wstring& path, void* params) {
1079 GURL file_url = net::FilePathToFileURL(path); 1080 GURL file_url = net::FilePathToFileURL(path);
1080 if (!file_url.is_empty()) 1081 if (!file_url.is_empty())
1081 OpenURL(file_url, GURL(), CURRENT_TAB, PageTransition::TYPED); 1082 OpenURL(file_url, GURL(), CURRENT_TAB, PageTransition::TYPED);
1082 } 1083 }
1083 1084
OLDNEW
« no previous file with comments | « chrome/app/theme/theme_resources.rc ('k') | chrome/browser/controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698