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

Side by Side Diff: content/browser/site_per_process_browsertest.cc

Issue 2089933002: Context Menu Refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing nits 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 unified diff | Download patch
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 "content/browser/site_per_process_browsertest.h" 5 #include "content/browser/site_per_process_browsertest.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 5080 matching lines...) Expand 10 before | Expand all | Expand 10 after
5091 5091
5092 // A WebContentsDelegate to capture ContextMenu creation events. 5092 // A WebContentsDelegate to capture ContextMenu creation events.
5093 class ContextMenuObserverDelegate : public WebContentsDelegate { 5093 class ContextMenuObserverDelegate : public WebContentsDelegate {
5094 public: 5094 public:
5095 ContextMenuObserverDelegate() 5095 ContextMenuObserverDelegate()
5096 : context_menu_created_(false), 5096 : context_menu_created_(false),
5097 message_loop_runner_(new MessageLoopRunner) {} 5097 message_loop_runner_(new MessageLoopRunner) {}
5098 5098
5099 ~ContextMenuObserverDelegate() override {} 5099 ~ContextMenuObserverDelegate() override {}
5100 5100
5101 bool HandleContextMenu(const content::ContextMenuParams& params) override { 5101 bool HandleContextMenu(RenderFrameHost* render_frame_host,
5102 const content::ContextMenuParams& params) override {
5102 context_menu_created_ = true; 5103 context_menu_created_ = true;
5103 menu_params_ = params; 5104 menu_params_ = params;
5104 message_loop_runner_->Quit(); 5105 message_loop_runner_->Quit();
5105 return true; 5106 return true;
5106 } 5107 }
5107 5108
5108 ContextMenuParams getParams() { return menu_params_; } 5109 ContextMenuParams getParams() { return menu_params_; }
5109 5110
5110 void Wait() { 5111 void Wait() {
5111 if (!context_menu_created_) 5112 if (!context_menu_created_)
(...skipping 2086 matching lines...) Expand 10 before | Expand all | Expand 10 after
7198 EXPECT_TRUE(is_fullscreen_allowed(root->child_at(0))); 7199 EXPECT_TRUE(is_fullscreen_allowed(root->child_at(0)));
7199 EXPECT_TRUE(is_fullscreen_allowed(root->child_at(0)->child_at(0))); 7200 EXPECT_TRUE(is_fullscreen_allowed(root->child_at(0)->child_at(0)));
7200 7201
7201 // Cross-site navigation should preserve the fullscreen flags. 7202 // Cross-site navigation should preserve the fullscreen flags.
7202 NavigateFrameToURL(root->child_at(0)->child_at(0), 7203 NavigateFrameToURL(root->child_at(0)->child_at(0),
7203 embedded_test_server()->GetURL("d.com", "/title1.html")); 7204 embedded_test_server()->GetURL("d.com", "/title1.html"));
7204 EXPECT_TRUE(is_fullscreen_allowed(root->child_at(0)->child_at(0))); 7205 EXPECT_TRUE(is_fullscreen_allowed(root->child_at(0)->child_at(0)));
7205 } 7206 }
7206 7207
7207 } // namespace content 7208 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698