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

Unified Diff: content/shell/browser/shell.cc

Issue 2132983002: Move content shell context menu to ShellWebContentsViewDelegate in Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed cast_shell_linux compile error Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/browser/shell.h ('k') | content/shell/browser/shell_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell.cc
diff --git a/content/shell/browser/shell.cc b/content/shell/browser/shell.cc
index ecb85f67dad9fe681e41e41d97172bf10bd265c3..5c780ab03dcee51854168c6e31a87835f82b6259 100644
--- a/content/shell/browser/shell.cc
+++ b/content/shell/browser/shell.cc
@@ -286,12 +286,14 @@ void Shell::UpdateNavigationControls(bool to_different_document) {
}
void Shell::ShowDevTools() {
- InnerShowDevTools();
-}
+ if (!devtools_frontend_) {
+ devtools_frontend_ = ShellDevToolsFrontend::Show(web_contents());
+ devtools_observer_.reset(new DevToolsWebContentsObserver(
+ this, devtools_frontend_->frontend_shell()->web_contents()));
+ }
-void Shell::ShowDevToolsForElementAt(int x, int y) {
- InnerShowDevTools();
- devtools_frontend_->InspectElementAt(x, y);
+ devtools_frontend_->Activate();
+ devtools_frontend_->Focus();
}
void Shell::CloseDevTools() {
@@ -438,10 +440,6 @@ void Shell::ActivateContents(WebContents* contents) {
contents->GetRenderViewHost()->GetWidget()->Focus();
}
-bool Shell::HandleContextMenu(const content::ContextMenuParams& params) {
- return PlatformHandleContextMenu(params);
-}
-
gfx::Size Shell::GetShellDefaultSize() {
static gfx::Size default_shell_size;
if (!default_shell_size.IsEmpty())
@@ -465,17 +463,6 @@ void Shell::TitleWasSet(NavigationEntry* entry, bool explicit_set) {
PlatformSetTitle(entry->GetTitle());
}
-void Shell::InnerShowDevTools() {
- if (!devtools_frontend_) {
- devtools_frontend_ = ShellDevToolsFrontend::Show(web_contents());
- devtools_observer_.reset(new DevToolsWebContentsObserver(
- this, devtools_frontend_->frontend_shell()->web_contents()));
- }
-
- devtools_frontend_->Activate();
- devtools_frontend_->Focus();
-}
-
void Shell::OnDevToolsWebContentsDestroyed() {
devtools_observer_.reset();
devtools_frontend_ = NULL;
« no previous file with comments | « content/shell/browser/shell.h ('k') | content/shell/browser/shell_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698