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

Side by Side Diff: sky/engine/core/page/Page.cpp

Issue 640143004: Remove context menus. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « sky/engine/core/page/Page.h ('k') | sky/engine/core/page/TouchAdjustment.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 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved.
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 19 matching lines...) Expand all
30 #include "core/frame/DOMTimer.h" 30 #include "core/frame/DOMTimer.h"
31 #include "core/frame/FrameConsole.h" 31 #include "core/frame/FrameConsole.h"
32 #include "core/frame/FrameHost.h" 32 #include "core/frame/FrameHost.h"
33 #include "core/frame/FrameView.h" 33 #include "core/frame/FrameView.h"
34 #include "core/frame/LocalDOMWindow.h" 34 #include "core/frame/LocalDOMWindow.h"
35 #include "core/frame/LocalFrame.h" 35 #include "core/frame/LocalFrame.h"
36 #include "core/frame/Settings.h" 36 #include "core/frame/Settings.h"
37 #include "core/page/AutoscrollController.h" 37 #include "core/page/AutoscrollController.h"
38 #include "core/page/Chrome.h" 38 #include "core/page/Chrome.h"
39 #include "core/page/ChromeClient.h" 39 #include "core/page/ChromeClient.h"
40 #include "core/page/ContextMenuController.h"
41 #include "core/page/FocusController.h" 40 #include "core/page/FocusController.h"
42 #include "core/page/PageLifecycleNotifier.h" 41 #include "core/page/PageLifecycleNotifier.h"
43 #include "core/page/scrolling/ScrollingCoordinator.h" 42 #include "core/page/scrolling/ScrollingCoordinator.h"
44 #include "core/rendering/RenderView.h" 43 #include "core/rendering/RenderView.h"
45 #include "wtf/HashMap.h" 44 #include "wtf/HashMap.h"
46 #include "wtf/RefCountedLeakCounter.h" 45 #include "wtf/RefCountedLeakCounter.h"
47 #include "wtf/StdLibExtras.h" 46 #include "wtf/StdLibExtras.h"
48 #include "wtf/text/Base64.h" 47 #include "wtf/text/Base64.h"
49 48
50 namespace blink { 49 namespace blink {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 return page->deviceScaleFactor(); 91 return page->deviceScaleFactor();
93 } 92 }
94 93
95 Page::Page(PageClients& pageClients) 94 Page::Page(PageClients& pageClients)
96 : SettingsDelegate(Settings::create()) 95 : SettingsDelegate(Settings::create())
97 , m_animator(this) 96 , m_animator(this)
98 , m_autoscrollController(AutoscrollController::create(*this)) 97 , m_autoscrollController(AutoscrollController::create(*this))
99 , m_chrome(Chrome::create(this, pageClients.chromeClient)) 98 , m_chrome(Chrome::create(this, pageClients.chromeClient))
100 , m_dragCaretController(DragCaretController::create()) 99 , m_dragCaretController(DragCaretController::create())
101 , m_focusController(FocusController::create(this)) 100 , m_focusController(FocusController::create(this))
102 , m_contextMenuController(ContextMenuController::create(this, pageClients.co ntextMenuClient))
103 , m_undoStack(UndoStack::create()) 101 , m_undoStack(UndoStack::create())
104 , m_mainFrame(0) 102 , m_mainFrame(0)
105 , m_editorClient(pageClients.editorClient) 103 , m_editorClient(pageClients.editorClient)
106 , m_spellCheckerClient(pageClients.spellCheckerClient) 104 , m_spellCheckerClient(pageClients.spellCheckerClient)
107 , m_tabKeyCyclesThroughElements(true) 105 , m_tabKeyCyclesThroughElements(true)
108 , m_deviceScaleFactor(1) 106 , m_deviceScaleFactor(1)
109 , m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()) 107 , m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval())
110 , m_visibilityState(PageVisibilityStateVisible) 108 , m_visibilityState(PageVisibilityStateVisible)
111 , m_isCursorVisible(true) 109 , m_isCursorVisible(true)
112 #if ENABLE(ASSERT) 110 #if ENABLE(ASSERT)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // remote frames. 176 // remote frames.
179 // FIXME: Unfortunately we can't assert on this at the moment, because this 177 // FIXME: Unfortunately we can't assert on this at the moment, because this
180 // is called in the base constructor for both LocalFrame and RemoteFrame, 178 // is called in the base constructor for both LocalFrame and RemoteFrame,
181 // when the vtables for the derived classes have not yet been setup. 179 // when the vtables for the derived classes have not yet been setup.
182 m_mainFrame = mainFrame; 180 m_mainFrame = mainFrame;
183 } 181 }
184 182
185 void Page::documentDetached(Document* document) 183 void Page::documentDetached(Document* document)
186 { 184 {
187 m_multisamplingChangedObservers.clear(); 185 m_multisamplingChangedObservers.clear();
188 m_contextMenuController->documentDetached(document);
189 } 186 }
190 187
191 bool Page::openedByDOM() const 188 bool Page::openedByDOM() const
192 { 189 {
193 return m_openedByDOM; 190 return m_openedByDOM;
194 } 191 }
195 192
196 void Page::setOpenedByDOM() 193 void Page::setOpenedByDOM()
197 { 194 {
198 m_openedByDOM = true; 195 m_openedByDOM = true;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 365
369 PassOwnPtr<LifecycleNotifier<Page> > Page::createLifecycleNotifier() 366 PassOwnPtr<LifecycleNotifier<Page> > Page::createLifecycleNotifier()
370 { 367 {
371 return PageLifecycleNotifier::create(this); 368 return PageLifecycleNotifier::create(this);
372 } 369 }
373 370
374 void Page::trace(Visitor* visitor) 371 void Page::trace(Visitor* visitor)
375 { 372 {
376 #if ENABLE(OILPAN) 373 #if ENABLE(OILPAN)
377 visitor->trace(m_dragCaretController); 374 visitor->trace(m_dragCaretController);
378 visitor->trace(m_contextMenuController);
379 visitor->trace(m_undoStack); 375 visitor->trace(m_undoStack);
380 visitor->trace(m_multisamplingChangedObservers); 376 visitor->trace(m_multisamplingChangedObservers);
381 visitor->trace(m_frameHost); 377 visitor->trace(m_frameHost);
382 #endif 378 #endif
383 WillBeHeapSupplementable<Page>::trace(visitor); 379 WillBeHeapSupplementable<Page>::trace(visitor);
384 LifecycleContext<Page>::trace(visitor); 380 LifecycleContext<Page>::trace(visitor);
385 } 381 }
386 382
387 void Page::willBeDestroyed() 383 void Page::willBeDestroyed()
388 { 384 {
(...skipping 12 matching lines...) Expand all
401 #ifndef NDEBUG 397 #ifndef NDEBUG
402 pageCounter.decrement(); 398 pageCounter.decrement();
403 #endif 399 #endif
404 400
405 m_chrome->willBeDestroyed(); 401 m_chrome->willBeDestroyed();
406 m_mainFrame = 0; 402 m_mainFrame = 0;
407 } 403 }
408 404
409 Page::PageClients::PageClients() 405 Page::PageClients::PageClients()
410 : chromeClient(0) 406 : chromeClient(0)
411 , contextMenuClient(0)
412 , editorClient(0) 407 , editorClient(0)
413 , spellCheckerClient(0) 408 , spellCheckerClient(0)
414 { 409 {
415 } 410 }
416 411
417 Page::PageClients::~PageClients() 412 Page::PageClients::~PageClients()
418 { 413 {
419 } 414 }
420 415
421 } // namespace blink 416 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/page/Page.h ('k') | sky/engine/core/page/TouchAdjustment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698