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

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

Issue 174162: Don't show "Inspect Element" in the context menu if we can't inspect. (Closed)
Patch Set: ... Created 11 years, 4 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/views/toolbar_view.h" 5 #include "chrome/browser/views/toolbar_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "app/drag_drop_types.h" 9 #include "app/drag_drop_types.h"
10 #include "app/gfx/canvas.h" 10 #include "app/gfx/canvas.h"
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 page_menu_contents_->AddItemWithStringId(IDC_REPORT_BUG, IDS_REPORT_BUG); 1039 page_menu_contents_->AddItemWithStringId(IDC_REPORT_BUG, IDS_REPORT_BUG);
1040 1040
1041 page_menu_menu_.reset(new views::Menu2(page_menu_contents_.get())); 1041 page_menu_menu_.reset(new views::Menu2(page_menu_contents_.get()));
1042 } 1042 }
1043 1043
1044 #if defined(OS_WIN) 1044 #if defined(OS_WIN)
1045 void ToolbarView::CreateDevToolsMenuContents() { 1045 void ToolbarView::CreateDevToolsMenuContents() {
1046 devtools_menu_contents_.reset(new views::SimpleMenuModel(this)); 1046 devtools_menu_contents_.reset(new views::SimpleMenuModel(this));
1047 devtools_menu_contents_->AddItem(IDC_VIEW_SOURCE, 1047 devtools_menu_contents_->AddItem(IDC_VIEW_SOURCE,
1048 l10n_util::GetString(IDS_VIEW_SOURCE)); 1048 l10n_util::GetString(IDS_VIEW_SOURCE));
1049 devtools_menu_contents_->AddItem(IDC_DEV_TOOLS, 1049 if (g_browser_process->have_inspector_files()) {
1050 l10n_util::GetString(IDS_DEV_TOOLS)); 1050 devtools_menu_contents_->AddItem(IDC_DEV_TOOLS,
1051 l10n_util::GetString(IDS_DEV_TOOLS));
1052 }
1051 devtools_menu_contents_->AddItem(IDC_TASK_MANAGER, 1053 devtools_menu_contents_->AddItem(IDC_TASK_MANAGER,
1052 l10n_util::GetString(IDS_TASK_MANAGER)); 1054 l10n_util::GetString(IDS_TASK_MANAGER));
1053 } 1055 }
1054 #endif 1056 #endif
1055 1057
1056 void ToolbarView::CreateAppMenu() { 1058 void ToolbarView::CreateAppMenu() {
1057 if (app_menu_contents_.get()) 1059 if (app_menu_contents_.get())
1058 return; 1060 return;
1059 1061
1060 app_menu_contents_.reset(new views::SimpleMenuModel(this)); 1062 app_menu_contents_.reset(new views::SimpleMenuModel(this));
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 app_menu_contents_->AddItem(IDC_ABOUT, 1104 app_menu_contents_->AddItem(IDC_ABOUT,
1103 l10n_util::GetStringFUTF16( 1105 l10n_util::GetStringFUTF16(
1104 IDS_ABOUT, 1106 IDS_ABOUT,
1105 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); 1107 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
1106 app_menu_contents_->AddItemWithStringId(IDC_HELP_PAGE, IDS_HELP_PAGE); 1108 app_menu_contents_->AddItemWithStringId(IDC_HELP_PAGE, IDS_HELP_PAGE);
1107 app_menu_contents_->AddSeparator(); 1109 app_menu_contents_->AddSeparator();
1108 app_menu_contents_->AddItemWithStringId(IDC_EXIT, IDS_EXIT); 1110 app_menu_contents_->AddItemWithStringId(IDC_EXIT, IDS_EXIT);
1109 1111
1110 app_menu_menu_.reset(new views::Menu2(app_menu_contents_.get())); 1112 app_menu_menu_.reset(new views::Menu2(app_menu_contents_.get()));
1111 } 1113 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | chrome/test/testing_browser_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698