summaryrefslogtreecommitdiffstats
path: root/chrome/browser/task_manager.h
Commit message (Collapse)AuthorAgeFilesLines
* Add more browser tests for Task Manager.phajdan.jr@chromium.org2009-07-151-3/+4
| | | | | | | | | TEST=Covered by browser_tests. http://crbug.com/12127 Review URL: http://codereview.chromium.org/155433 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20786 0039d316-1c4b-4281-b951-d872f2087c98
* Reorganize the way the task manager is constructed.ben@chromium.org2009-06-221-37/+12
| | | | | | | | | | | The BrowserWindow creates the task manager UI directly, which uses the TaskManager to populate itself. BUG=none TEST=none Review URL: http://codereview.chromium.org/140044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18975 0039d316-1c4b-4281-b951-d872f2087c98
* Destroy TaskManager's view when its window is closed.phajdan.jr@chromium.org2009-06-101-2/+3
| | | | | | | | | | TEST=Open the task manager. Close it. Open again and close. Browser should not crash. http://crbug.com/13361 Review URL: http://codereview.chromium.org/119299 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18038 0039d316-1c4b-4281-b951-d872f2087c98
* Latest attempt at enabling task manager tests and not having them leak or crash!ben@chromium.org2009-06-041-2/+2
| | | | | | | | | | | Make Task Manager Table view a scoped_ptr so it and its columns are deleted regardless of whether or not the HWND has been constructed. BUG=none TEST=none Review URL: http://codereview.chromium.org/119208 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17677 0039d316-1c4b-4281-b951-d872f2087c98
* This is also required.ben@chromium.org2009-06-041-2/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17622 0039d316-1c4b-4281-b951-d872f2087c98
* Create OpenClose browser test for TaskManager with necessary refactoring.phajdan.jr@chromium.org2009-05-271-2/+5
| | | | | | | | http://crbug.com/12320 Review URL: http://codereview.chromium.org/113636 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16978 0039d316-1c4b-4281-b951-d872f2087c98
* Reverts parts of ↵jam@chromium.org2009-05-211-7/+0
| | | | | | | | http://src.chromium.org/viewvc/chrome?view=rev&revision=16474 which aren't needed anymore. Review URL: http://codereview.chromium.org/113669 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16642 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a crash on browser exit after opening TaskManager.phajdan.jr@chromium.org2009-05-201-0/+7
| | | | | | | | | | | | | | | | | | | | | TaskManager is a singleton, so it's destroyed by AtExitManager. At the time of destruction it cannot register AtExit callbacks (AtExitManager requires that). It turns out that some Windows view code wants to register an AtExit callback during destruction. For more info about view code, see http://src.chromium.org/viewvc/chrome?view=rev&revision=9161 The fix is to destroy the view early, using EnsureShutdown static method of TaskManager. It was also necessary to delete child views a bit earlier to avoid another crashed. Added a regression browser_test and verified that it's broken without this fix. http://crbug.com/11180 Review URL: http://codereview.chromium.org/114031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16474 0039d316-1c4b-4281-b951-d872f2087c98
* Extract Windows-specific parts of TaskManager.phajdan.jr@chromium.org2009-05-141-2/+12
| | | | | | | | | | | | | | - task_manager.cc compiles on POSIX - task_manager_unittest.cc passes on Linux - stub TaskManagerViewImpl for Linux (so that the unit test can pass) TEST=Task manager should not be obviously broken on Windows. http://crbug.com/11461 Review URL: http://codereview.chromium.org/115295 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16053 0039d316-1c4b-4281-b951-d872f2087c98
* De-couple TaskManager from TableView code.phajdan.jr@chromium.org2009-05-111-50/+74
| | | | | | | | | | | | This is another step towards porting the TaskManager. TEST=Launch Chrome, open the task manager. You should see correctly reported and updated resource data. http://crbug.com/11461 Review URL: http://codereview.chromium.org/115031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15768 0039d316-1c4b-4281-b951-d872f2087c98
* Move src/chrome/views to src/views. RS=darin http://crbug.com/11387ben@chromium.org2009-05-081-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15604 0039d316-1c4b-4281-b951-d872f2087c98
* Make task_manager.h a bit more independent from views.phajdan.jr@chromium.org2009-05-061-14/+1
| | | | | | | | | | | | | | | Let the internal TaskManagerContents be the DialogDelegate instead of the TaskManager itself. This is a small step towards porting the TaskManager. TEST=Launch chrome.exe, open the Task Manager, close it. Close the browser. Nothing should be broken, the browser should not crash. http://crbug.com/11461 Review URL: http://codereview.chromium.org/111002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15395 0039d316-1c4b-4281-b951-d872f2087c98
* Make task_manager_resource_providers.cc compile on POSIX.phajdan.jr@chromium.org2009-04-301-3/+12
| | | | | | | | TEST=Make sure that the task manager isn't obviously broken on Windows. Review URL: http://codereview.chromium.org/93067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14934 0039d316-1c4b-4281-b951-d872f2087c98
* Add virtual dtor for TaskManager::ResourceProvider.phajdan.jr@chromium.org2009-04-271-0/+2
| | | | | | | | | It has virtual methods but no virtual dtor. This change may help fix memory leaks which appeared after adding unit tests for TaskManager. Review URL: http://codereview.chromium.org/100041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14599 0039d316-1c4b-4281-b951-d872f2087c98
* Add basic unit tests for TaskManager.phajdan.jr@chromium.org2009-04-271-0/+4
| | | | | | | | | | | | | For now the tests are Windows-only, because the TaskManager isn't ported. But they should make porting effort a bit safer. TEST=Make sure that tests from unit_tests matching TaskManagerTest.* pass. http://crbug.com/10844 Review URL: http://codereview.chromium.org/92071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14590 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup in chrome/browserphajdan.jr@chromium.org2009-03-251-7/+7
| | | | | | | | | | - make more things const - remove unreferenced declaration of GetGoButton - fix indentation in one place Review URL: http://codereview.chromium.org/53053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12475 0039d316-1c4b-4281-b951-d872f2087c98
* Chrome-side of moving webkit/glue/cache_manager.{h,cc} to the WebKit API layer.darin@chromium.org2009-03-191-1/+1
| | | | | | | | | | | | | | This also includes a change to not have third_party/WebKit/WebKit/chromium/public in the global include path. Most of the code changes pertain to this. I also took this opportunity to do some renaming: browser/cache_manager_host -> browser/renderer_host/web_cache_manager R=brettw Review URL: http://codereview.chromium.org/42194 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12085 0039d316-1c4b-4281-b951-d872f2087c98
* Move controls into their own dir under chrome/views/controlsben@chromium.org2009-03-171-1/+1
| | | | | | | | TBR=sky Review URL: http://codereview.chromium.org/48058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11841 0039d316-1c4b-4281-b951-d872f2087c98
* Move windowing related objects into chrome/views/window subdir.ben@chromium.org2009-03-171-2/+2
| | | | | | | | TBR=sky Review URL: http://codereview.chromium.org/42272 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11819 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-101-2/+0
| | | | | | | | | Normalize end of file newlines in chrome/. All files end in a single newline. Review URL: http://codereview.chromium.org/42015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11331 0039d316-1c4b-4281-b951-d872f2087c98
* Test to see if we can reduce some crashes by deferring delegate destruction ↵ben@chromium.org2009-03-061-0/+1
| | | | | | | | until WM_NCDESTROY. This involves adding a specific method to allow delegates to destroy themselves to WindowDelegate, and moving all delete this calls into implementations of that method (to allow delegates to still respond to WM_DESTROY which is legit). Review URL: http://codereview.chromium.org/40192 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11132 0039d316-1c4b-4281-b951-d872f2087c98
* Remove pointless function override (the base class does the exact same thing ↵pkasting@chromium.org2009-01-291-1/+0
| | | | | | | | already). Review URL: http://codereview.chromium.org/19653 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8900 0039d316-1c4b-4281-b951-d872f2087c98
* ===================================================xji@chromium.org2009-01-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change list fixes the following 2 chrome bugs: 2821 RTL: Ellipsis appeared at right for RTL locales on "Task Manager - Google Chrome" dialog (http://crbug.com/2821) 6132: Strings in tables are displayed LTR when they should be RTL (http://crbug.com/6132) =================================================== Background: The above 2 bugs are related to Chrome task manager. Task manager is a TableView, which is a subclass of NativeControl. Currently, TableView window is created by using WS_EX_LAYOUTRTL | WS_EX_RTLREADING flag, which is wrong. WS_EX_LAYOUTRTL | WS_EX_RTLREADING renders a RTL alignment but LTR reading order. Please see the following blog for detail: http://blogs.msdn.com/michkap/archive/2007/03/11/1857043.aspx We need to replace the above flag with WS_EX_LAYOUTRTL only. Consequently, we need to make sure that the various implementations of TableModel::GetText adjust the returned text appropriately if need be. For example, if the text in an URL, then the returned text should be explicitly marked as LTR text. Please note: there are several other places where we create RTL window using WS_EX_LAYOUTRTL | WS_EX_RTLREADING flag, such as AutoCompleteEditView (omnibox), MenuHostWindow, TextField (for example, text in bookmark dialog), and other NativeControl (including checkbox, combobox, native_button, radio_button, separator, tabbed_pane, and tree view). They all need to be fixed. And the following bug is filed for tracking. http://crbug.com/6573 =================================================== The fix is based on Idan's comments on bug 6132 1.create the table view with WS_EX_LAYOUTRTL (rather than WS_EX_LAYOUTRTL | WS_EX_RTLREADING) 2 Make sure that the various implementations of TableModel::GetText adjust the returned text appropriately if need be. If the text in an URL, then the returned text is explicitly marked as LTR text. Otherwise, the returned text is marked with LTR if it is RTL environment and there is no strong RTL character in the text. This is to avoid the wrong placement of (or wrong mirrored) ending-punctuation. =================================================== Since we have quite a few places creating window using WS_EX_LAYOUTRTL | WS_EX_RTLREADING style. We decided to migrate to the right style step to step. This is the first step, and there is unnecessary function introduced by this change list. 1. I am using l10n_util::GetExtendedTooltipStyles() for the right style for now. And I marked a TODO there to obsolete this function name, replace with GetExtendedStyles eventually. (the l10n_util.h is no longer in the change list since I've checked it in with another CL). 2. I introduced native_control::GetAdditionalRTLStyle() which should replace GetAdditionalExStyle() eventually. =================================================== When wrapping text with LTR format in GetText(), ideally, we should parse the text to check whether this is a n URL or not (for example, a webpage title could be an URL, or user could add URL as search engine's name or keyword). I did not do that and only added a TODO there because I think that might be rare case and parsing the text might cause performance degradation. Review URL: http://codereview.chromium.org/18076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8593 0039d316-1c4b-4281-b951-d872f2087c98
* Move a bunch of TabContents related files into a tab_contents subdirben@chromium.org2009-01-151-1/+1
| | | | | | Review URL: http://codereview.chromium.org/18250 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8058 0039d316-1c4b-4281-b951-d872f2087c98
* Add Terminate() to the Process object, have RenderProcessHost use this to ↵brettw@google.com2008-11-141-7/+7
| | | | | | | | | | avoid some more Windows specific code. Move Process and SharedMemory into the base namespace (most changes). Review URL: http://codereview.chromium.org/10895 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5446 0039d316-1c4b-4281-b951-d872f2087c98
* Re-do the way browser windows are shown:ben@chromium.org2008-11-141-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove the path from WinMain to the Browser object passing the show_command. For the Browser object, this is a problem since this value isn't portable. For the code in general it involves a lot of ugly wiring. It's completely unnecessary since the value is obtainable via GetStartupInfo. - Remove show_command plumbing from all over the place (session restore, web app launcher, etc) Change the way browser windows are constructed: - The browser constructor now takes just a type and a profile, and simply initializes the object. - Some configuration that used to be part of the constructor that was only used in one or two use cases (initial bounds, maximized state, web app name) are split into separate setters. - Window creation is split out into a separate step to be called post configuration. - Assorted static helper functions added to Browser to make construction of common types easy. - Remove Browser::Show in favor of BrowserWindow::Show - Adjust all callers to use the new helpers. Change the way ChromeViews restores window placement: - Split restored size determination from restored maximized determination. They are needed by the code at different times. Size restoration happens when the window is constructed and Window::SetInitialBounds is called. Maximized state restoration happens when the window is shown for the first time and SW_SHOWMAXIMIZED or SW_SHOWNORMAL is needed. Thus, replace WindowDelegate::RestoreWindowPosition with WindowDelegate::RestoreWindowBounds and WindowDelegate::RestoreMaximizedState. - Window::SetInitialBounds calls WindowDelegate::RestoreWindowBounds - Window::Show calls WindowDelegate::RestoreMaximizedState - Adjusts all WindowDelegate implementations that override RestoreWindowPosition to implement these new methods instead. - Move "playback/record" mode window size setting from browser_init to Browser::RestoreWindowBounds. - Provide a virtual function on Window called GetShowState that determines the default show state to be used when Window::Show is called. For most windows and dialogs this is SW_SHOWNORMAL. AeroGlassFrame/OpaqueFrame (the browser window frames) override this since they're the app's main windows to return the value provided by GetStartupInfo which gives the value from the app shortcut. http://crbug.com/3557 Review URL: http://codereview.chromium.org/10896 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5417 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ChromeViews namespace to viewsben@chromium.org2008-10-161-8/+8
| | | | | | http://crbug.com/2188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3495 0039d316-1c4b-4281-b951-d872f2087c98
* This CL makes the task manager columns sortable.jcampan@chromium.org2008-10-091-23/+60
| | | | | | | | | | | It ensures the CPU usage is only computed once per periodic update. Also it now posts tasks instead of using a timer, as timers can fire erraticly if the thread is really busy. BUG=95 TEST=Open the task manager. Click on the columns to sort. Review URL: http://codereview.chromium.org/7016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3108 0039d316-1c4b-4281-b951-d872f2087c98
* Double clicking on an item in the task manager should bring the relevant tab ↵petersont@google.com2008-09-101-0/+14
| | | | | | | | forward. Review URL: http://codereview.chromium.org/1822 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2026 0039d316-1c4b-4281-b951-d872f2087c98
* Minor cleanup to OneShotTimer and RepeatingTimer: moves more of the member ↵darin@google.com2008-09-031-6/+2
| | | | | | | | | | | variables into the Task subclass. Also included in this change: deprecate MessageLoop::timer_manager(), and change consumers over to use OneShotTimer or RepeatingTimer. R=beng BUG=1346553 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1684 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify OneShotTimer and RepeatingTimer. Fix up all consumers.darin@google.com2008-08-281-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Major changes: OneShotTimer and RepeatingTimer become template classes that no longer require a Task or a Timer object. They just use PostDelayedTask. Under the hood that still uses a Timer object. The API is much simpler for consumers as they now no longer need to worry about allocating a Task or managing the lifetime of the object pointer held by the Task. I added some new unit tests to timer_unittest.cc to cover the API. I preserved the old TimerManager / Timer API for now, but I plan to soon kill it. R=brettw BUG=1346553 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1502 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Forward declare Task in ssl_manager.h. Cleanup some uses of ↵deanm@google.com2008-08-011-1/+0
| | | | | | | | notification_service.h. TBR=maruel git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238 0039d316-1c4b-4281-b951-d872f2087c98
* Window Delegate Improvements:beng@google.com2008-07-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | - Windows now must have a Delegate. Just construct the default WindowDelegate if you don't want to have to write one in testing. - Windows now obtain their contents view by asking the delegate via WindowDelegate::GetContentsView. - Contents views no longer need to manually store a pointer to the Window that contains them, WindowDelegate does this automatically via its window() accessor. Reviewer notes: - review window_delegate.h first, then - window.h/cc - custom frame window.h/cc - constrained_window_impl.h/cc - then everything else (just updating all call sites) B=1280060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96 0039d316-1c4b-4281-b951-d872f2087c98
* Add chrome to the repository.initial.commit2008-07-261-0/+302
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15 0039d316-1c4b-4281-b951-d872f2087c98