diff options
author | maruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-15 12:27:03 +0000 |
---|---|---|
committer | maruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-15 12:27:03 +0000 |
commit | 1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf (patch) | |
tree | b78be07dbada3ac0f6d2435558e4a6aaba198ffc /chrome/browser | |
parent | ea15e98a9353494df754a11fb49f0e4b8c0d4789 (diff) | |
download | chromium_src-1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf.zip chromium_src-1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf.tar.gz chromium_src-1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf.tar.bz2 |
Large patch set (159 files total) to cleanup the includes.
- Slightly reduce the size of the generated .lib files ~3%.
- Reduce the number of implicit and explicit atl and windows includes. hooray!
- Help incremental build by reducing the number of unnecessary included files.
- Split some template class in two, one base class for the common code and the specialization that inherits from the base class.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@937 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
85 files changed, 415 insertions, 257 deletions
diff --git a/chrome/browser/SConscript b/chrome/browser/SConscript index 0824ce5..6b9ba58 100644 --- a/chrome/browser/SConscript +++ b/chrome/browser/SConscript @@ -113,6 +113,7 @@ input_files = [ 'browser_process_impl.cc', 'browser_shutdown.cc', 'browser_url_handler.cc', + 'browser_window.cc', 'browsing_data_remover.cc', 'browsing_instance.cc', 'cache_manager_host.cc', diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc index 416b0b3..de2e2f1 100644 --- a/chrome/browser/autocomplete/autocomplete_edit.cc +++ b/chrome/browser/autocomplete/autocomplete_edit.cc @@ -34,9 +34,11 @@ #include "base/base_drag_source.h" #include "base/clipboard_util.h" #include "base/gfx/skia_utils.h" +#include "base/iat_patch.h" #include "base/ref_counted.h" #include "base/string_util.h" #include "chrome/app/chrome_dll_resource.h" +#include "chrome/browser/autocomplete/autocomplete_popup.h" #include "chrome/browser/autocomplete/edit_drop_target.h" #include "chrome/browser/autocomplete/keyword_provider.h" #include "chrome/browser/browser_process.h" @@ -504,6 +506,14 @@ void AutocompleteEdit::ClosePopup() { popup_->StopAutocomplete(); } +bool AutocompleteEdit::query_in_progress() const { + return popup_->query_in_progress(); +} + +const AutocompleteResult* AutocompleteEdit::latest_result() const { + return popup_->latest_result(); +} + IAccessible* AutocompleteEdit::GetIAccessible() { if (!autocomplete_accessibility_) { CComObject<AutocompleteAccessibility>* accessibility = NULL; diff --git a/chrome/browser/autocomplete/autocomplete_edit.h b/chrome/browser/autocomplete/autocomplete_edit.h index 9f3ecca..35b4b01 100644 --- a/chrome/browser/autocomplete/autocomplete_edit.h +++ b/chrome/browser/autocomplete/autocomplete_edit.h @@ -27,28 +27,33 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H__ -#define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H__ +#ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ +#define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ #include <atlbase.h> #include <atlapp.h> -#include <atlcomcli.h> +#include <atlcrack.h> #include <atlctrls.h> -#include <oleacc.h> +#include <atlmisc.h> #include <tom.h> // For ITextDocument, a COM interface to CRichEditCtrl -#include "base/iat_patch.h" #include "base/scoped_ptr.h" -#include "chrome/browser/autocomplete/autocomplete_popup.h" -#include "chrome/browser/security_style.h" +#include "chrome/browser/autocomplete/autocomplete.h" #include "chrome/browser/toolbar_model.h" #include "chrome/common/gfx/chrome_font.h" +#include "chrome/common/page_transition_types.h" #include "chrome/views/menu.h" +#include "webkit/glue/window_open_disposition.h" +class AutocompletePopup; class CommandController; class Profile; class TabContents; +namespace ChromeViews { +class View; +} + // Provides the implementation of an edit control with a drop-down // autocomplete box. The box itself is implemented in autocomplete_popup.cc // This file implements the edit box and management for the popup. @@ -236,14 +241,12 @@ class AutocompleteEdit // in progress. This logic should in the future live in // AutocompleteController but resides here for now. This method is used by // AutomationProvider::AutocompleteEditIsQueryInProgress. - bool query_in_progress() const { return popup_->query_in_progress(); } + bool query_in_progress() const; // Returns the lastest autocomplete results. This logic should in the future // live in AutocompleteController but resides here for now. This method is // used by AutomationProvider::AutocompleteEditGetMatches. - const AutocompleteResult* latest_result() const { - return popup_->latest_result(); - } + const AutocompleteResult* latest_result() const; // Exposes custom IAccessible implementation to the overall MSAA hierarchy. IAccessible* GetIAccessible(); @@ -807,7 +810,7 @@ class AutocompleteEdit // Instance of accessibility information and handling. mutable CComPtr<IAccessible> autocomplete_accessibility_; - DISALLOW_EVIL_CONSTRUCTORS(AutocompleteEdit); + DISALLOW_COPY_AND_ASSIGN(AutocompleteEdit); }; -#endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H__ +#endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index d6e6b08..e580aa3 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -30,6 +30,7 @@ #include "chrome/browser/automation/automation_provider.h" #include "base/path_service.h" +#include "chrome/app/chrome_dll_resource.h" #include "chrome/browser/automation/automation_provider_list.h" #include "chrome/browser/automation/ui_controls.h" #include "chrome/browser/automation/url_request_failed_dns_job.h" @@ -45,6 +46,7 @@ #include "chrome/browser/printing/print_job.h" #include "chrome/browser/save_package.h" #include "chrome/browser/ssl_blocking_page.h" +#include "chrome/browser/web_contents.h" #include "chrome/browser/views/location_bar_view.h" #include "chrome/common/chrome_paths.h" #include "chrome/test/automation/automation_messages.h" diff --git a/chrome/browser/bookmark_bar_context_menu_controller.cc b/chrome/browser/bookmark_bar_context_menu_controller.cc index 75bd4fb..472bad2 100644 --- a/chrome/browser/bookmark_bar_context_menu_controller.cc +++ b/chrome/browser/bookmark_bar_context_menu_controller.cc @@ -34,11 +34,14 @@ #include "chrome/browser/browser_list.h" #include "chrome/browser/page_navigator.h" #include "chrome/browser/profile.h" +#include "chrome/browser/tab_contents.h" #include "chrome/browser/user_metrics.h" #include "chrome/browser/views/bookmark_editor_view.h" #include "chrome/browser/views/input_window.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" +#include "chrome/views/view_container.h" +#include "chrome/views/window.h" #include "generated_resources.h" diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index b1c5d88..bc8408f 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -41,6 +41,7 @@ #include "chrome/browser/browser_shutdown.h" #include "chrome/browser/browser_url_handler.h" #include "chrome/browser/cert_store.h" +#include "chrome/browser/debugger/debugger_window.h" #include "chrome/browser/dom_ui/new_tab_ui.h" #include "chrome/browser/frame_util.h" #include "chrome/browser/navigation_controller.h" @@ -58,6 +59,7 @@ #include "chrome/browser/views/download_shelf_view.h" #include "chrome/browser/views/go_button.h" #include "chrome/browser/views/bookmark_bar_view.h" +#include "chrome/browser/views/html_dialog_view.h" #include "chrome/browser/views/location_bar_view.h" #include "chrome/browser/views/toolbar_star_toggle.h" #include "chrome/browser/vista_frame.h" @@ -67,6 +69,7 @@ #include "chrome/common/l10n_util.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" +#include "chrome/common/win_util.h" #include "net/base/cookie_monster.h" #include "net/base/cookie_policy.h" #include "net/base/net_util.h" diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h index 35ccb37..6b467183 100644 --- a/chrome/browser/browser.h +++ b/chrome/browser/browser.h @@ -30,31 +30,28 @@ #ifndef CHROME_BROWSER_BROWSER_H_ #define CHROME_BROWSER_BROWSER_H_ -#include "chrome/app/chrome_dll_resource.h" -#include "chrome/browser/browser_type.h" #include "chrome/browser/controller.h" #include "chrome/browser/hang_monitor/hung_plugin_action.h" #include "chrome/browser/hang_monitor/hung_window_detector.h" -#include "chrome/browser/render_process_host.h" #include "chrome/browser/shell_dialogs.h" -#include "chrome/browser/debugger/debugger_window.h" +#include "chrome/browser/browser_type.h" +#include "chrome/browser/session_id.h" #include "chrome/browser/tab_contents_delegate.h" -#include "chrome/browser/tab_contents_type.h" #include "chrome/browser/tabs/tab_strip_model.h" -#include "chrome/browser/tabs/tab.h" #include "chrome/browser/toolbar_model.h" -#include "chrome/browser/views/html_dialog_view.h" #include "chrome/common/notification_service.h" #include "chrome/common/pref_member.h" +class BrowserIdleTask; class BrowserWindow; +class DebuggerWindow; class GoButton; class LocationBarView; class PrefService; class Profile; class StatusBubble; +struct TabNavigation; class WebContents; -class BrowserIdleTask; class WebApp; class Browser : public TabStripModelDelegate, @@ -649,7 +646,7 @@ class Browser : public TabStripModelDelegate, // Keep track of the encoding auto detect pref. BooleanPrefMember encoding_auto_detect_; - DISALLOW_EVIL_CONSTRUCTORS(Browser); + DISALLOW_COPY_AND_ASSIGN(Browser); }; #endif // CHROME_BROWSER_BROWSER_H_ diff --git a/chrome/browser/browser.vcproj b/chrome/browser/browser.vcproj index 98286a1..d6fd648 100644 --- a/chrome/browser/browser.vcproj +++ b/chrome/browser/browser.vcproj @@ -1022,6 +1022,10 @@ > </File> <File + RelativePath=".\browser_window.cc" + > + </File> + <File RelativePath=".\browser_window.h" > </File> @@ -1578,6 +1582,10 @@ > </File> <File + RelativePath=".\session_id.h" + > + </File> + <File RelativePath=".\session_service.cc" > </File> diff --git a/chrome/browser/browser_commands.cc b/chrome/browser/browser_commands.cc index e0e14e1..0514dfb 100644 --- a/chrome/browser/browser_commands.cc +++ b/chrome/browser/browser_commands.cc @@ -32,60 +32,37 @@ #include <commdlg.h> #include <shellapi.h> -#include <map> -#include <iostream> -#include <fstream> - -#include "base/command_line.h" #include "base/file_version_info.h" -#include "base/gfx/png_encoder.h" -#include "base/path_service.h" -#include "base/string_util.h" -#include "base/win_util.h" +#include "chrome/app/chrome_dll_resource.h" #include "chrome/app/locales/locale_settings.h" #include "chrome/browser/automation/ui_controls.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/browser_process.h" -#include "chrome/browser/browser_shutdown.h" #include "chrome/browser/browser_window.h" #include "chrome/browser/character_encoding.h" -#include "chrome/browser/dom_ui/new_tab_ui.h" +#include "chrome/browser/debugger/debugger_window.h" #include "chrome/browser/download_tab_view.h" #include "chrome/browser/history_tab_ui.h" #include "chrome/browser/interstitial_page_delegate.h" -#include "chrome/browser/navigation_controller.h" #include "chrome/browser/navigation_entry.h" -#include "chrome/browser/network_status_view.h" #include "chrome/browser/options_window.h" -#include "chrome/browser/profile.h" -#include "chrome/browser/session_startup_pref.h" #include "chrome/browser/tab_restore_service.h" #include "chrome/browser/task_manager.h" -#include "chrome/browser/url_fixer_upper.h" #include "chrome/browser/user_metrics.h" -#include "chrome/browser/view_ids.h" #include "chrome/browser/views/about_chrome_view.h" -#include "chrome/browser/views/bookmark_bubble_view.h" #include "chrome/browser/views/bug_report_view.h" #include "chrome/browser/views/clear_browsing_data.h" #include "chrome/browser/views/importer_view.h" -#include "chrome/browser/views/info_bubble.h" -#include "chrome/browser/views/first_run_view.h" #include "chrome/browser/views/keyword_editor_view.h" -#include "chrome/browser/views/location_bar_view.h" #include "chrome/browser/views/password_manager_view.h" #include "chrome/browser/views/toolbar_star_toggle.h" #include "chrome/browser/views/toolbar_view.h" -#include "chrome/common/chrome_constants.h" -#include "chrome/common/chrome_switches.h" -#include "chrome/common/l10n_util.h" -#include "chrome/common/notification_service.h" +#include "chrome/browser/web_contents.h" #include "chrome/common/pref_names.h" -#include "chrome/common/text_zoom.h" +#include "chrome/common/pref_service.h" #include "chrome/common/win_util.h" -#include "chrome/views/window.h" -#include "net/base/escape.h" #include "net/base/net_util.h" + #include "generated_resources.h" /////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index e3a4630..9745026 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -29,7 +29,6 @@ #include "chrome/browser/browser_init.h" -#include <windows.h> #include <shellapi.h> #include "base/basictypes.h" @@ -39,6 +38,7 @@ #include "base/histogram.h" #include "base/path_service.h" #include "base/string_util.h" +#include "base/win_util.h" #include "chrome/app/locales/locale_settings.h" #include "chrome/app/result_codes.h" #include "chrome/browser/automation/automation_provider.h" @@ -61,6 +61,7 @@ #include "chrome/common/logging_chrome.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" +#include "chrome/common/win_util.h" #include "net/base/cookie_monster.h" #include "net/base/net_util.h" diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 2287533..c0b3d03 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -40,6 +40,7 @@ #include "base/registry.h" #include "base/string_util.h" #include "base/tracked_objects.h" +#include "base/win_util.h" #include "chrome/app/result_codes.h" #include "chrome/browser/automation/automation_provider.h" #include "chrome/browser/browser.h" diff --git a/chrome/browser/browser_prefs.cc b/chrome/browser/browser_prefs.cc index 986e2d3..16eee27 100644 --- a/chrome/browser/browser_prefs.cc +++ b/chrome/browser/browser_prefs.cc @@ -43,12 +43,12 @@ #include "chrome/browser/session_startup_pref.h" #include "chrome/browser/spellchecker.h" #include "chrome/browser/ssl_manager.h" -#include "chrome/browser/tab_contents.h" #include "chrome/browser/tabs/tab_strip_model.h" #include "chrome/browser/task_manager.h" #include "chrome/browser/template_url_prepopulate_data.h" #include "chrome/browser/views/bookmark_bar_view.h" #include "chrome/browser/views/keyword_editor_view.h" +#include "chrome/browser/web_contents.h" namespace browser { diff --git a/chrome/browser/browser_window.cc b/chrome/browser/browser_window.cc new file mode 100644 index 0000000..7098ae7 --- /dev/null +++ b/chrome/browser/browser_window.cc @@ -0,0 +1,39 @@ +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "chrome/browser/browser_window.h" + +#include <windows.h> + +void BrowserWindow::InfoBubbleClosing() { + // TODO(beng): (Cleanup) - move out of here! + HWND hwnd = static_cast<HWND>(GetPlatformID()); + // The frame is really inactive, send notification now. + DefWindowProc(hwnd, WM_NCACTIVATE, FALSE, 0); +}
\ No newline at end of file diff --git a/chrome/browser/browser_window.h b/chrome/browser/browser_window.h index c450562..c5a9420 100644 --- a/chrome/browser/browser_window.h +++ b/chrome/browser/browser_window.h @@ -169,12 +169,7 @@ class BrowserWindow { // The implementation for this sends WM_NCACTIVATE with a value of FALSE for // the window. Subclasses that need to customize should be sure and invoke // this implementation too. - virtual void InfoBubbleClosing() { - // TODO(beng): (Cleanup) - move out of here! - HWND hwnd = static_cast<HWND>(GetPlatformID()); - // The frame is really inactive, send notification now. - DefWindowProc(hwnd, WM_NCACTIVATE, FALSE, 0); - } + virtual void InfoBubbleClosing(); // Returns the star button. virtual ToolbarStarToggle* GetStarButton() const = 0; diff --git a/chrome/browser/debugger/debugger_io.h b/chrome/browser/debugger/debugger_io.h index 6d6e792..7408c62 100644 --- a/chrome/browser/debugger/debugger_io.h +++ b/chrome/browser/debugger/debugger_io.h @@ -27,15 +27,18 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_BROWSER_DEBUGGER_DEBUGGER_IO_H__ -#define CHROME_BROWSER_DEBUGGER_DEBUGGER_IO_H__ +#ifndef CHROME_BROWSER_DEBUGGER_DEBUGGER_IO_H_ +#define CHROME_BROWSER_DEBUGGER_DEBUGGER_IO_H_ + +#include <string> #include "base/basictypes.h" #include "base/ref_counted.h" class DebuggerShell; -class DebuggerInputOutput: public base::RefCountedThreadSafe<DebuggerInputOutput> { +class DebuggerInputOutput + : public base::RefCountedThreadSafe<DebuggerInputOutput> { public: DebuggerInputOutput() {} virtual ~DebuggerInputOutput() {} @@ -65,8 +68,7 @@ protected: DebuggerShell* debugger_; private: - - DISALLOW_EVIL_CONSTRUCTORS(DebuggerInputOutput); + DISALLOW_COPY_AND_ASSIGN(DebuggerInputOutput); }; -#endif // CHROME_BROWSER_DEBUGGER_DEBUGGER_IO_H__
\ No newline at end of file +#endif // CHROME_BROWSER_DEBUGGER_DEBUGGER_IO_H_
\ No newline at end of file diff --git a/chrome/browser/debugger/debugger_node.cc b/chrome/browser/debugger/debugger_node.cc index 6ae0c49..885bb82 100644 --- a/chrome/browser/debugger/debugger_node.cc +++ b/chrome/browser/debugger/debugger_node.cc @@ -27,7 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "debugger_node.h" +#include "chrome/browser/debugger/debugger_node.h" #include "base/process_util.h" #include "base/string_util.h" @@ -36,6 +36,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/render_process_host.h" #include "chrome/browser/render_view_host.h" +#include "chrome/browser/web_contents.h" #include "chrome/browser/debugger/debugger_shell.h" DebuggerNode::DebuggerNode() : valid_(true), observing_(false), data_(NULL) { diff --git a/chrome/browser/debugger/debugger_wrapper.h b/chrome/browser/debugger/debugger_wrapper.h index 92d9c6c..33ba584 100644 --- a/chrome/browser/debugger/debugger_wrapper.h +++ b/chrome/browser/debugger/debugger_wrapper.h @@ -32,15 +32,18 @@ // Debugger needed, add new wrapper methods to this file. // // This is a workaround to enable the Debugger without breaking the KJS build. -// It wraps all methods in Debugger which are called from outside of the debugger -// project. Each solution has its own project with debugger files. KJS has only -// debugger_wrapper* and debugger.h, and defines CHROME_DEBUGGER_DISABLED, which makes -// it compile only a stub version of Debugger that doesn't reference V8. Meanwhile -// the V8 solution includes all of the debugger files without CHROME_DEBUGGER_DISABLED -// so the full functionality is enabled. +// It wraps all methods in Debugger which are called from outside of the +// debugger project. Each solution has its own project with debugger files. +// KJS has only debugger_wrapper* and debugger.h, and defines +// CHROME_DEBUGGER_DISABLED, which makes it compile only a stub version of +// Debugger that doesn't reference V8. Meanwhile the V8 solution includes all +// of the debugger files without CHROME_DEBUGGER_DISABLED so the full +// functionality is enabled. -#ifndef CHROME_BROWSER_DEBUGGER_DEBUGGER_INTERFACE_H__ -#define CHROME_BROWSER_DEBUGGER_DEBUGGER_INTERFACE_H__ +#ifndef CHROME_BROWSER_DEBUGGER_DEBUGGER_INTERFACE_H_ +#define CHROME_BROWSER_DEBUGGER_DEBUGGER_INTERFACE_H_ + +#include <string> #include "base/basictypes.h" #include "base/ref_counted.h" @@ -64,5 +67,4 @@ class DebuggerWrapper : public base::RefCountedThreadSafe<DebuggerWrapper> { scoped_refptr<DebuggerShell> debugger_; }; - -#endif // CHROME_BROWSER_DEBUGGER_DEBUGGER_INTERFACE_H__
\ No newline at end of file +#endif // CHROME_BROWSER_DEBUGGER_DEBUGGER_INTERFACE_H_
\ No newline at end of file diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc index e45c6ef..ef36f49 100644 --- a/chrome/browser/dom_ui/new_tab_ui.cc +++ b/chrome/browser/dom_ui/new_tab_ui.cc @@ -46,6 +46,7 @@ #include "chrome/common/jstemplate_builder.h" #include "chrome/common/l10n_util.h" #include "chrome/common/pref_names.h" +#include "chrome/common/pref_service.h" #include "chrome/common/resource_bundle.h" #include "generated_resources.h" diff --git a/chrome/browser/download_tab_view.cc b/chrome/browser/download_tab_view.cc index 5f76810..d675833 100644 --- a/chrome/browser/download_tab_view.cc +++ b/chrome/browser/download_tab_view.cc @@ -607,7 +607,7 @@ void DownloadItemTabView::DidChangeBounds(const CRect& previous, } bool DownloadItemTabView::OnMousePressed(const ChromeViews::MouseEvent& event) { - CPoint point(event.GetLocation()); + CPoint point(event.GetX(), event.GetY()); // If the click is in the highlight region, then highlight this download. // Otherwise, remove the highlighting from any download. @@ -642,7 +642,7 @@ bool DownloadItemTabView::OnMouseDragged(const ChromeViews::MouseEvent& event) { if (model_->state() != DownloadItem::COMPLETE) return false; - CPoint point(event.GetLocation()); + CPoint point(event.GetX(), event.GetY()); // In order to make sure drag and drop works as expected when the UI is // mirrored, we can either flip the mouse X coordinate or flip the X position diff --git a/chrome/browser/encoding_menu_controller_delegate.cc b/chrome/browser/encoding_menu_controller_delegate.cc index f0c26c0..8ebd8d8 100644 --- a/chrome/browser/encoding_menu_controller_delegate.cc +++ b/chrome/browser/encoding_menu_controller_delegate.cc @@ -29,11 +29,14 @@ #include "chrome/browser/encoding_menu_controller_delegate.h" +#include "chrome/app/chrome_dll_resource.h" #include "chrome/browser/browser.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/character_encoding.h" #include "chrome/browser/profile.h" +#include "chrome/browser/tab_contents.h" #include "chrome/common/pref_names.h" +#include "chrome/common/pref_service.h" #include "generated_resources.h" diff --git a/chrome/browser/external_tab_container.cc b/chrome/browser/external_tab_container.cc index ad872d9..069896a 100644 --- a/chrome/browser/external_tab_container.cc +++ b/chrome/browser/external_tab_container.cc @@ -30,6 +30,7 @@ #include "chrome/browser/external_tab_container.h" #include "base/logging.h" +#include "base/win_util.h" #include "chrome/browser/automation/automation_provider.h" #include "chrome/browser/profile.h" #include "chrome/browser/tab_contents.h" diff --git a/chrome/browser/external_tab_container.h b/chrome/browser/external_tab_container.h index e31340d..eb8bd94 100644 --- a/chrome/browser/external_tab_container.h +++ b/chrome/browser/external_tab_container.h @@ -27,8 +27,8 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H__ -#define CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H__ +#ifndef CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ +#define CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ #include <atlbase.h> #include <atlapp.h> @@ -41,6 +41,7 @@ #include "chrome/common/notification_service.h" #include "chrome/views/focus_manager.h" #include "chrome/views/root_view.h" +#include "chrome/views/view_container.h" class AutomationProvider; class TabContents; @@ -161,6 +162,7 @@ class ExternalTabContainer : public TabContentsDelegate, // A view to handle focus cycling TabContentsContainerView* tab_contents_container_; private: - DISALLOW_EVIL_CONSTRUCTORS(ExternalTabContainer); + DISALLOW_COPY_AND_ASSIGN(ExternalTabContainer); }; + #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H__ diff --git a/chrome/browser/find_in_page_controller.cc b/chrome/browser/find_in_page_controller.cc index 4d5c8ef..d5af4a8 100644 --- a/chrome/browser/find_in_page_controller.cc +++ b/chrome/browser/find_in_page_controller.cc @@ -37,9 +37,9 @@ #include "chrome/browser/view_ids.h" #include "chrome/browser/views/bookmark_bar_view.h" #include "chrome/views/external_focus_tracker.h" -#include "chrome/views/focus_manager.h" -#include "chrome/views/native_scroll_bar.h" #include "chrome/views/hwnd_view_container.h" +#include "chrome/views/native_scroll_bar.h" +#include "chrome/views/root_view.h" #include "chrome/views/view_storage.h" int FindInPageController::request_id_counter_ = 0; diff --git a/chrome/browser/find_in_page_controller.h b/chrome/browser/find_in_page_controller.h index 1ee56d4..b0d06ac 100644 --- a/chrome/browser/find_in_page_controller.h +++ b/chrome/browser/find_in_page_controller.h @@ -27,15 +27,16 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_BROWSER_FIND_IN_PAGE_CONTROLLER_H__ -#define CHROME_BROWSER_FIND_IN_PAGE_CONTROLLER_H__ +#ifndef CHROME_BROWSER_FIND_IN_PAGE_CONTROLLER_H_ +#define CHROME_BROWSER_FIND_IN_PAGE_CONTROLLER_H_ -#include "base/gfx/size.h" +#include "base/gfx/rect.h" #include "chrome/browser/render_view_host_delegate.h" -#include "chrome/common/slide_animation.h" +#include "chrome/common/animation.h" #include "chrome/views/hwnd_view_container.h" class FindInPageView; +class SlideAnimation; class TabContents; namespace ChromeViews { @@ -253,7 +254,7 @@ class FindInPageController : public RenderViewHostDelegate::FindInPage, // closed. scoped_ptr<ChromeViews::ExternalFocusTracker> focus_tracker_; - DISALLOW_EVIL_CONSTRUCTORS(FindInPageController); + DISALLOW_COPY_AND_ASSIGN(FindInPageController); }; -#endif // CHROME_BROWSER_FIND_IN_PAGE_CONTROLLER_H__ +#endif // CHROME_BROWSER_FIND_IN_PAGE_CONTROLLER_H_ diff --git a/chrome/browser/frame_util.cc b/chrome/browser/frame_util.cc index 2cad99b..90e413c 100644 --- a/chrome/browser/frame_util.cc +++ b/chrome/browser/frame_util.cc @@ -30,6 +30,7 @@ #include "chrome/browser/frame_util.h" #include "base/message_loop.h" +#include "base/win_util.h" #include "chrome/app/result_codes.h" #include "chrome/browser/app_modal_dialog_queue.h" #include "chrome/browser/browser.h" @@ -42,6 +43,7 @@ #include "chrome/browser/simple_vista_frame.h" #include "chrome/browser/simple_xp_frame.h" #include "chrome/browser/vista_frame.h" +#include "chrome/browser/web_contents.h" #include "chrome/browser/xp_frame.h" #include "chrome/common/notification_source.h" #include "chrome/common/win_util.h" diff --git a/chrome/browser/frame_view.cc b/chrome/browser/frame_view.cc index cb6d7bc..3d1c680 100644 --- a/chrome/browser/frame_view.cc +++ b/chrome/browser/frame_view.cc @@ -31,6 +31,7 @@ #include "chrome/browser/browser_window.h" #include "chrome/browser/tabs/tab_strip.h" +#include "chrome/common/drag_drop_types.h" #include "chrome/common/os_exchange_data.h" FrameView::FrameView(BrowserWindow* window) diff --git a/chrome/browser/history_view.cc b/chrome/browser/history_view.cc index de95322..7af3135 100644 --- a/chrome/browser/history_view.cc +++ b/chrome/browser/history_view.cc @@ -39,6 +39,7 @@ #include "chrome/browser/views/bookmark_bubble_view.h" #include "chrome/browser/views/event_utils.h" #include "chrome/browser/views/star_toggle.h" +#include "chrome/common/drag_drop_types.h" #include "chrome/common/gfx/chrome_canvas.h" #include "chrome/common/gfx/favicon_size.h" #include "chrome/common/resource_bundle.h" diff --git a/chrome/browser/jsmessage_box_handler.cc b/chrome/browser/jsmessage_box_handler.cc index a2e3174..09b9757 100644 --- a/chrome/browser/jsmessage_box_handler.cc +++ b/chrome/browser/jsmessage_box_handler.cc @@ -37,6 +37,7 @@ #include "chrome/common/notification_service.h" #include "chrome/common/notification_types.h" #include "chrome/common/pref_names.h" +#include "chrome/common/pref_service.h" #include "chrome/views/message_box_view.h" #include "chrome/views/window.h" diff --git a/chrome/browser/native_ui_contents.cc b/chrome/browser/native_ui_contents.cc index 67b1186..8d12b52 100644 --- a/chrome/browser/native_ui_contents.cc +++ b/chrome/browser/native_ui_contents.cc @@ -27,11 +27,13 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#include "chrome/browser/native_ui_contents.h" + #include "chrome/browser/browser.h" #include "chrome/browser/download_tab_view.h" #include "chrome/browser/history_tab_ui.h" -#include "chrome/browser/native_ui_contents.h" #include "chrome/browser/navigation_entry.h" +#include "chrome/common/drag_drop_types.h" #include "chrome/common/gfx/chrome_canvas.h" #include "chrome/common/gfx/chrome_font.h" #include "chrome/common/l10n_util.h" diff --git a/chrome/browser/navigation_controller_base.cc b/chrome/browser/navigation_controller_base.cc index 3216bc9..f34876d 100644 --- a/chrome/browser/navigation_controller_base.cc +++ b/chrome/browser/navigation_controller_base.cc @@ -33,7 +33,6 @@ #include "base/logging.h" #include "chrome/browser/navigation_entry.h" -#include "net/base/registry_controlled_domain.h" #include "webkit/glue/webkit_glue.h" // The maximum number of entries that a navigation controller can store. diff --git a/chrome/browser/navigation_controller_base.h b/chrome/browser/navigation_controller_base.h index ada690f..6b33a58 100644 --- a/chrome/browser/navigation_controller_base.h +++ b/chrome/browser/navigation_controller_base.h @@ -27,16 +27,17 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_BROWSER_NAVIGATION_CONTROLLER_BASE_H__ -#define CHROME_BROWSER_NAVIGATION_CONTROLLER_BASE_H__ +#ifndef CHROME_BROWSER_NAVIGATION_CONTROLLER_BASE_H_ +#define CHROME_BROWSER_NAVIGATION_CONTROLLER_BASE_H_ #include <vector> -#include "chrome/browser/site_instance.h" #include "chrome/browser/tab_contents_type.h" #include "chrome/common/page_transition_types.h" +#include "testing/gtest/include/gtest/gtest_prod.h" class NavigationEntry; +class SiteInstance; //////////////////////////////////////////////////////////////////////////////// // @@ -232,7 +233,7 @@ class NavigationControllerBase { // The maximum number of entries that a navigation controller can store. size_t max_entry_count_; - DISALLOW_EVIL_CONSTRUCTORS(NavigationControllerBase); + DISALLOW_COPY_AND_ASSIGN(NavigationControllerBase); }; -#endif // CHROME_BROWSER_NAVIGATION_CONTROLLER_BASE_H__ +#endif // CHROME_BROWSER_NAVIGATION_CONTROLLER_BASE_H_ diff --git a/chrome/browser/network_status_view.cc b/chrome/browser/network_status_view.cc index d901324..39c9e92 100644 --- a/chrome/browser/network_status_view.cc +++ b/chrome/browser/network_status_view.cc @@ -27,10 +27,10 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include <stdio.h> - #include "chrome/browser/network_status_view.h" +#include <stdio.h> + #include "base/string_util.h" #include "base/thread.h" #include "chrome/browser/browser.h" @@ -40,6 +40,7 @@ #include "chrome/browser/page_load_tracker.h" #include "chrome/browser/tab_contents_delegate.h" #include "chrome/views/hwnd_view_container.h" +#include "chrome/views/root_view.h" #include "net/url_request/url_request.h" #include "net/url_request/url_request_job.h" diff --git a/chrome/browser/page_load_tracker.cc b/chrome/browser/page_load_tracker.cc index a1d8f2b..1c0bc8a 100644 --- a/chrome/browser/page_load_tracker.cc +++ b/chrome/browser/page_load_tracker.cc @@ -29,9 +29,6 @@ #include "chrome/browser/page_load_tracker.h" -#include <stdlib.h> -#include <string> - #include "base/string_util.h" #include "chrome/common/gfx/chrome_canvas.h" #include "chrome/common/gfx/chrome_font.h" diff --git a/chrome/browser/page_load_tracker.h b/chrome/browser/page_load_tracker.h index dda772f..3bf8984 100644 --- a/chrome/browser/page_load_tracker.h +++ b/chrome/browser/page_load_tracker.h @@ -42,25 +42,19 @@ // See the comments in navigation_profiler.h for an overview of profiling // architecture. -#ifndef CHROME_BROWSER_PAGE_LOAD_TRACKER_H__ -#define CHROME_BROWSER_PAGE_LOAD_TRACKER_H__ - -#include <windows.h> -#include <atlbase.h> -#include <atlapp.h> -#include <atlmisc.h> +#ifndef CHROME_BROWSER_PAGE_LOAD_TRACKER_H_ +#define CHROME_BROWSER_PAGE_LOAD_TRACKER_H_ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/time.h" #include "chrome/common/page_transition_types.h" #include "chrome/views/view.h" #include "googleurl/src/gurl.h" -#include "net/url_request/url_request_job.h" #include "testing/gtest/include/gtest/gtest_prod.h" +class URLRequestJobMetrics; class ChromeCanvas; // Tracks one frame navigation within the page. @@ -198,4 +192,4 @@ class PageLoadView : public ChromeViews::View { PageLoadTracker* page_; }; -#endif // CHROME_BROWSER_PAGE_LOAD_TRACKER_H__ +#endif // CHROME_BROWSER_PAGE_LOAD_TRACKER_H_ diff --git a/chrome/browser/password_manager.cc b/chrome/browser/password_manager.cc index 0015188..84590cd 100644 --- a/chrome/browser/password_manager.cc +++ b/chrome/browser/password_manager.cc @@ -27,15 +27,17 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "chrome/app/theme/theme_resources.h" #include "chrome/browser/password_manager.h" + +#include "base/string_util.h" +#include "chrome/app/theme/theme_resources.h" #include "chrome/browser/profile.h" #include "chrome/browser/web_contents.h" #include "chrome/common/l10n_util.h" #include "chrome/common/pref_names.h" +#include "chrome/common/pref_service.h" #include "chrome/common/resource_bundle.h" #include "chrome/common/stl_util-inl.h" -#include "base/string_util.h" #include "generated_resources.h" diff --git a/chrome/browser/printing/page_overlays.cc b/chrome/browser/printing/page_overlays.cc index 6f9d8c3..2b99396 100644 --- a/chrome/browser/printing/page_overlays.cc +++ b/chrome/browser/printing/page_overlays.cc @@ -29,6 +29,7 @@ #include "chrome/browser/printing/page_overlays.h" +#include "base/logging.h" #include "base/string_util.h" #include "chrome/browser/printing/printed_document.h" #include "chrome/browser/printing/printed_page.h" diff --git a/chrome/browser/printing/page_overlays_unittest.cc b/chrome/browser/printing/page_overlays_unittest.cc index d15453a..90ac1a2 100644 --- a/chrome/browser/printing/page_overlays_unittest.cc +++ b/chrome/browser/printing/page_overlays_unittest.cc @@ -56,7 +56,7 @@ class PagesSource : public printing::PrintedPagesSource { public: virtual void RenderOnePrintedPage(printing::PrintedDocument* document, int page_number) { - NOTREACHED(); + EXPECT_FALSE(true); } virtual std::wstring RenderSourceName() { diff --git a/chrome/browser/printing/printer_query.h b/chrome/browser/printing/printer_query.h index 9b1e50b..70b47df 100644 --- a/chrome/browser/printing/printer_query.h +++ b/chrome/browser/printing/printer_query.h @@ -27,9 +27,10 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_BROWSER_PRINTING_PRINTER_QUERY_H__ -#define CHROME_BROWSER_PRINTING_PRINTER_QUERY_H__ +#ifndef CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ +#define CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ +#include "base/scoped_ptr.h" #include "base/ref_counted.h" #include "chrome/browser/printing/print_job_worker_owner.h" @@ -119,9 +120,9 @@ class PrinterQuery : public base::RefCountedThreadSafe<PrinterQuery>, // Task waiting to be executed. scoped_ptr<CancelableTask> callback_; - DISALLOW_EVIL_CONSTRUCTORS(PrinterQuery); + DISALLOW_COPY_AND_ASSIGN(PrinterQuery); }; } // namespace printing -#endif // CHROME_BROWSER_PRINTING_PRINTER_QUERY_H__ +#endif // CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ diff --git a/chrome/browser/render_widget_host_hwnd.cc b/chrome/browser/render_widget_host_hwnd.cc index d0adcc3..f17fc7a 100644 --- a/chrome/browser/render_widget_host_hwnd.cc +++ b/chrome/browser/render_widget_host_hwnd.cc @@ -29,8 +29,6 @@ #include "chrome/browser/render_widget_host_hwnd.h" -#include <windows.h> - #include "base/command_line.h" #include "base/gfx/bitmap_header.h" #include "base/gfx/rect.h" @@ -43,6 +41,7 @@ #include "chrome/browser/render_widget_host.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" +#include "chrome/common/l10n_util.h" #include "chrome/common/plugin_messages.h" #include "chrome/common/win_util.h" #include "chrome/views/hwnd_view_container.h" diff --git a/chrome/browser/session_id.h b/chrome/browser/session_id.h new file mode 100644 index 0000000..073f8ed --- /dev/null +++ b/chrome/browser/session_id.h @@ -0,0 +1,60 @@ +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef CHROME_BROWSER_SESSION_ID_H_ +#define CHROME_BROWSER_SESSION_ID_H_ + +// SessionID ------------------------------------------------------------------ + +// Uniquely identifies a session, tab or window. + +class SessionID { + friend class SessionService; + public: + typedef int32 id_type; + + SessionID(); + ~SessionID() {} + + // Returns the underlying id. + id_type id() const { return id_; } + + // Returns true if the two commands are equal. + bool Equals(const SessionID& other) const; + + private: + explicit SessionID(id_type id) : id_(id) {} + + // Resets the id. This is used when restoring a session + void set_id(id_type id) { id_ = id; } + + id_type id_; +}; + +#endif // CHROME_BROWSER_SESSION_ID_H_ diff --git a/chrome/browser/session_restore.cc b/chrome/browser/session_restore.cc index 57cc6d8..1cc86ef 100644 --- a/chrome/browser/session_restore.cc +++ b/chrome/browser/session_restore.cc @@ -35,7 +35,9 @@ #include "chrome/browser/browser.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/navigation_controller.h" #include "chrome/browser/profile.h" +#include "chrome/browser/tab_contents.h" #include "chrome/common/notification_service.h" namespace { diff --git a/chrome/browser/session_service.cc b/chrome/browser/session_service.cc index 6e78f9c..9ed3d9f 100644 --- a/chrome/browser/session_service.cc +++ b/chrome/browser/session_service.cc @@ -27,11 +27,10 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include <limits> -#include <Windows.h> - #include "chrome/browser/session_service.h" +#include <limits> + #include "base/file_util.h" #include "base/message_loop.h" #include "base/pickle.h" @@ -43,6 +42,7 @@ #include "chrome/browser/navigation_entry.h" #include "chrome/browser/profile.h" #include "chrome/browser/session_backend.h" +#include "chrome/browser/tab_contents.h" #include "chrome/common/notification_details.h" #include "chrome/common/notification_service.h" #include "chrome/common/notification_types.h" diff --git a/chrome/browser/session_service.h b/chrome/browser/session_service.h index df932f9..8c7a6a6 100644 --- a/chrome/browser/session_service.h +++ b/chrome/browser/session_service.h @@ -38,6 +38,7 @@ #include "base/time.h" #include "chrome/browser/browser_type.h" #include "chrome/browser/cancelable_request.h" +#include "chrome/browser/session_id.h" #include "chrome/common/notification_service.h" #include "chrome/common/page_transition_types.h" #include "chrome/common/stl_util-inl.h" @@ -53,33 +54,6 @@ class Timer; class SessionBackend; class SessionCommand; -// SessionID ------------------------------------------------------------------ - -// Uniquely identifies a session, tab or window. - -class SessionID { - friend class SessionService; - public: - typedef int32 id_type; - - SessionID(); - ~SessionID() {} - - // Returns the underlying id. - id_type id() const { return id_; } - - // Returns true if the two commands are equal. - bool Equals(const SessionID& other) const; - - private: - explicit SessionID(id_type id) : id_(id) {} - - // Resets the id. This is used when restoring a session - void set_id(id_type id) { id_ = id; } - - id_type id_; -}; - // TabNavigation ------------------------------------------------------------ // TabNavigation corresponds to a NavigationEntry. diff --git a/chrome/browser/shell_dialogs.h b/chrome/browser/shell_dialogs.h index 8b11060..aee15a1 100644 --- a/chrome/browser/shell_dialogs.h +++ b/chrome/browser/shell_dialogs.h @@ -27,8 +27,13 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_BROWSER_SHELL_DIALOGS_H__ -#define CHROME_BROWSER_SHELL_DIALOGS_H__ +#ifndef CHROME_BROWSER_SHELL_DIALOGS_H_ +#define CHROME_BROWSER_SHELL_DIALOGS_H_ + +// TODO(maruel): Remove once HWND is typedef. +#include <windows.h> + +#include <string> #include "base/ref_counted.h" @@ -156,4 +161,4 @@ class SelectFontDialog int font_size) = 0; }; -#endif // #ifndef CHROME_BROWSER_SHELL_DIALOGS_H__ +#endif // #ifndef CHROME_BROWSER_SHELL_DIALOGS_H_ diff --git a/chrome/browser/simple_xp_frame.cc b/chrome/browser/simple_xp_frame.cc index f6120f8..a1bf084 100644 --- a/chrome/browser/simple_xp_frame.cc +++ b/chrome/browser/simple_xp_frame.cc @@ -148,7 +148,7 @@ void TitleBarMenuButton::Paint(ChromeCanvas* canvas) { bool TitleBarMenuButton::OnMousePressed(const ChromeViews::MouseEvent& e) { if (e.GetFlags() & ChromeViews::MouseEvent::EF_IS_DOUBLE_CLICK) { - if (!HitTest(e.GetLocation())) + if (!HitTest(WTL::CPoint(e.GetX(), e.GetY()))) return true; title_bar_->CloseWindow(); return true; diff --git a/chrome/browser/ssl_manager.h b/chrome/browser/ssl_manager.h index 89ca87b..d90af2a 100644 --- a/chrome/browser/ssl_manager.h +++ b/chrome/browser/ssl_manager.h @@ -27,8 +27,8 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_BROWSER_SSL_MANAGER_H__ -#define CHROME_BROWSER_SSL_MANAGER_H__ +#ifndef CHROME_BROWSER_SSL_MANAGER_H_ +#define CHROME_BROWSER_SSL_MANAGER_H_ #include <string> #include <map> @@ -54,6 +54,7 @@ class NavigationController; class NavigationEntry; class LoadFromMemoryCacheDetails; class LoadNotificationDetails; +class PrefService; class ResourceRedirectDetails; class ResourceRequestDetails; class SSLErrorInfo; @@ -479,7 +480,7 @@ class SSLManager : public NotificationObserver { // currently loading had loaded. std::vector<SSLMessageInfo> pending_messages_; - DISALLOW_EVIL_CONSTRUCTORS(SSLManager); + DISALLOW_COPY_AND_ASSIGN(SSLManager); }; -#endif // CHROME_BROWSER_SSL_MANAGER_H__ +#endif // CHROME_BROWSER_SSL_MANAGER_H_ diff --git a/chrome/browser/tab_contents.cc b/chrome/browser/tab_contents.cc index 43c4b15..419a796 100644 --- a/chrome/browser/tab_contents.cc +++ b/chrome/browser/tab_contents.cc @@ -36,8 +36,9 @@ #include "chrome/browser/web_contents.h" #include "chrome/browser/tab_contents_delegate.h" #include "chrome/common/pref_names.h" -#include "chrome/views/focus_manager.h" +#include "chrome/common/pref_service.h" #include "chrome/views/native_scroll_bar.h" +#include "chrome/views/root_view.h" #include "chrome/views/view.h" #include "chrome/views/view_storage.h" diff --git a/chrome/browser/tab_contents_delegate.h b/chrome/browser/tab_contents_delegate.h index 30d6cbc..40183d6 100644 --- a/chrome/browser/tab_contents_delegate.h +++ b/chrome/browser/tab_contents_delegate.h @@ -27,20 +27,18 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_BROWSER_TAB_CONTENTS_DELEGATE_H__ -#define CHROME_BROWSER_TAB_CONTENTS_DELEGATE_H__ +#ifndef CHROME_BROWSER_TAB_CONTENTS_DELEGATE_H_ +#define CHROME_BROWSER_TAB_CONTENTS_DELEGATE_H_ +// TODO(maruel): Remove once UINT and HWND are replaced / typedef. #include <windows.h> -#include <string> #include "chrome/browser/page_navigator.h" -#include "chrome/common/page_transition_types.h" #include "chrome/common/navigation_types.h" -#include "webkit/glue/window_open_disposition.h" namespace gfx { - class Point; - class Rect; +class Point; +class Rect; } class TabContents; @@ -192,4 +190,4 @@ class TabContentsDelegate : public PageNavigator { } }; -#endif // CHROME_BROWSER_TAB_CONTENTS_DELEGATE_H__ +#endif // CHROME_BROWSER_TAB_CONTENTS_DELEGATE_H_ diff --git a/chrome/browser/tabs/dragged_tab_controller.cc b/chrome/browser/tabs/dragged_tab_controller.cc index c522276..6a17a459 100644 --- a/chrome/browser/tabs/dragged_tab_controller.cc +++ b/chrome/browser/tabs/dragged_tab_controller.cc @@ -27,10 +27,10 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include <math.h> - #include "chrome/browser/tabs/dragged_tab_controller.h" +#include <math.h> + #include "chrome/browser/browser_window.h" #include "chrome/browser/frame_util.h" #include "chrome/browser/tab_contents.h" @@ -40,6 +40,7 @@ #include "chrome/browser/tabs/tab_strip.h" #include "chrome/browser/web_contents.h" #include "chrome/views/event.h" +#include "chrome/views/root_view.h" #include "skia/include/SkBitmap.h" static const int kHorizontalMoveThreshold = 16; // pixels diff --git a/chrome/browser/tabs/dragged_tab_controller.h b/chrome/browser/tabs/dragged_tab_controller.h index 690baf9..d3352c5 100644 --- a/chrome/browser/tabs/dragged_tab_controller.h +++ b/chrome/browser/tabs/dragged_tab_controller.h @@ -27,11 +27,11 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_BROWSER_TABS_DRAGGED_TAB_CONTROLLER_H__ -#define CHROME_BROWSER_TABS_DRAGGED_TAB_CONTROLLER_H__ +#ifndef CHROME_BROWSER_TABS_DRAGGED_TAB_CONTROLLER_H_ +#define CHROME_BROWSER_TABS_DRAGGED_TAB_CONTROLLER_H_ -#include "base/gfx/point.h" #include "base/gfx/rect.h" +#include "base/message_loop.h" #include "chrome/browser/tab_contents_delegate.h" #include "chrome/browser/tabs/tab_renderer.h" #include "chrome/common/notification_service.h" @@ -303,7 +303,7 @@ class DraggedTabController : public TabContentsDelegate, // time of the last re-order event. int last_move_screen_x_; - DISALLOW_EVIL_CONSTRUCTORS(DraggedTabController); + DISALLOW_COPY_AND_ASSIGN(DraggedTabController); }; -#endif // CHROME_BROWSER_TABS_DRAGGED_TAB_CONTROLLER_H__ +#endif // CHROME_BROWSER_TABS_DRAGGED_TAB_CONTROLLER_H_ diff --git a/chrome/browser/tabs/tab.cc b/chrome/browser/tabs/tab.cc index f253faa..3dd5427 100644 --- a/chrome/browser/tabs/tab.cc +++ b/chrome/browser/tabs/tab.cc @@ -30,11 +30,7 @@ #include "chrome/browser/tabs/tab.h" #include "base/gfx/size.h" -#include "chrome/browser/tab_contents.h" -#include "chrome/browser/tabs/tab_strip.h" -#include "chrome/browser/profile.h" -#include "chrome/browser/user_metrics.h" -#include "chrome/common/l10n_util.h" +#include "chrome/views/view_container.h" #include "chrome/common/resource_bundle.h" #include "chrome/views/chrome_menu.h" #include "chrome/views/tooltip_manager.h" diff --git a/chrome/browser/tabs/tab.h b/chrome/browser/tabs/tab.h index 8c78190..5b909cb 100644 --- a/chrome/browser/tabs/tab.h +++ b/chrome/browser/tabs/tab.h @@ -27,14 +27,12 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_BROWSER_TABS_TAB_H__ -#define CHROME_BROWSER_TABS_TAB_H__ +#ifndef CHROME_BROWSER_TABS_TAB_H_ +#define CHROME_BROWSER_TABS_TAB_H_ -#include "base/gfx/point.h" #include "chrome/browser/tabs/tab_renderer.h" #include "chrome/browser/tabs/tab_strip_model.h" -#include "chrome/views/button.h" -#include "chrome/views/menu.h" +#include "chrome/views/base_button.h" namespace gfx { class Point; @@ -138,7 +136,7 @@ class Tab : public TabRenderer, // True if the tab is being animated closed. bool closing_; - DISALLOW_EVIL_CONSTRUCTORS(Tab); + DISALLOW_COPY_AND_ASSIGN(Tab); }; -#endif // CHROME_BROWSER_TABS_TAB_H__ +#endif // CHROME_BROWSER_TABS_TAB_H_ diff --git a/chrome/browser/tabs/tab_strip.cc b/chrome/browser/tabs/tab_strip.cc index f4b1447..1a757fa 100644 --- a/chrome/browser/tabs/tab_strip.cc +++ b/chrome/browser/tabs/tab_strip.cc @@ -40,6 +40,7 @@ #include "chrome/browser/view_ids.h" #include "chrome/browser/vista_frame.h" #include "chrome/browser/web_contents.h" +#include "chrome/common/drag_drop_types.h" #include "chrome/common/gfx/chrome_canvas.h" #include "chrome/common/l10n_util.h" #include "chrome/common/os_exchange_data.h" diff --git a/chrome/browser/task_manager.cc b/chrome/browser/task_manager.cc index 17cddba..95a8798 100644 --- a/chrome/browser/task_manager.cc +++ b/chrome/browser/task_manager.cc @@ -45,6 +45,7 @@ #include "chrome/views/accelerator.h" #include "chrome/views/background.h" #include "chrome/views/link.h" +#include "chrome/views/menu.h" #include "chrome/views/native_button.h" #include "chrome/views/window.h" #include "net/url_request/url_request.h" diff --git a/chrome/browser/toolbar_model.cc b/chrome/browser/toolbar_model.cc index 6321555..2e2b1be 100644 --- a/chrome/browser/toolbar_model.cc +++ b/chrome/browser/toolbar_model.cc @@ -35,6 +35,7 @@ #include "chrome/browser/ssl_error_info.h" #include "chrome/browser/tab_contents.h" #include "chrome/common/gfx/url_elider.h" +#include "chrome/common/l10n_util.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" #include "net/base/net_util.h" diff --git a/chrome/browser/views/SConscript b/chrome/browser/views/SConscript index f494e9b..350b3e0 100644 --- a/chrome/browser/views/SConscript +++ b/chrome/browser/views/SConscript @@ -85,6 +85,7 @@ input_files = [ 'constrained_window_animation.cc', 'constrained_window_impl.cc', 'delay_view.cc', + 'dom_view.cc', 'download_item_view.cc', 'download_shelf_view.cc', 'download_started_animation.cc', diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc index e7084cd..c7128e3 100644 --- a/chrome/browser/views/about_chrome_view.cc +++ b/chrome/browser/views/about_chrome_view.cc @@ -40,6 +40,7 @@ #include "chrome/browser/standard_layout.h" #include "chrome/browser/user_metrics.h" #include "chrome/browser/views/restart_message_box.h" +#include "chrome/common/l10n_util.h" #include "chrome/common/resource_bundle.h" #include "chrome/common/chrome_constants.h" #include "chrome/installer/util/install_util.h" diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc index d249d38..3ece239 100644 --- a/chrome/browser/views/bookmark_bar_view.cc +++ b/chrome/browser/views/bookmark_bar_view.cc @@ -27,10 +27,10 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include <limits> - #include "chrome/browser/views/bookmark_bar_view.h" +#include <limits> + #include "base/base_drag_source.h" #include "base/gfx/skia_utils.h" #include "chrome/app/theme/theme_resources.h" @@ -46,6 +46,7 @@ #include "chrome/browser/history/history.h" #include "chrome/browser/page_navigator.h" #include "chrome/browser/profile.h" +#include "chrome/browser/tab_contents.h" #include "chrome/browser/user_metrics.h" #include "chrome/browser/view_ids.h" #include "chrome/browser/views/bookmark_editor_view.h" @@ -66,6 +67,8 @@ #include "chrome/views/chrome_menu.h" #include "chrome/views/menu_button.h" #include "chrome/views/tooltip_manager.h" +#include "chrome/views/view_container.h" +#include "chrome/views/window.h" #include "generated_resources.h" using ChromeViews::BaseButton; diff --git a/chrome/browser/views/bookmark_bar_view_test.cc b/chrome/browser/views/bookmark_bar_view_test.cc index a2a84e7..b2f43c0 100644 --- a/chrome/browser/views/bookmark_bar_view_test.cc +++ b/chrome/browser/views/bookmark_bar_view_test.cc @@ -39,6 +39,7 @@ #include "chrome/test/ui/view_event_test_base.h" #include "chrome/views/chrome_menu.h" #include "chrome/views/text_button.h" +#include "chrome/views/window.h" namespace { diff --git a/chrome/browser/views/browser_views.vcproj b/chrome/browser/views/browser_views.vcproj index b63141e..1ff0c1d2 100644 --- a/chrome/browser/views/browser_views.vcproj +++ b/chrome/browser/views/browser_views.vcproj @@ -402,6 +402,10 @@ > </File> <File + RelativePath=".\dom_view.cc" + > + </File> + <File RelativePath=".\dom_view.h" > </File> diff --git a/chrome/browser/views/constrained_window_impl.cc b/chrome/browser/views/constrained_window_impl.cc index f12a41a..7524debc 100644 --- a/chrome/browser/views/constrained_window_impl.cc +++ b/chrome/browser/views/constrained_window_impl.cc @@ -29,6 +29,7 @@ #include "chrome/browser/views/constrained_window_impl.h" +#include "base/gfx/rect.h" #include "chrome/app/chrome_dll_resource.h" #include "chrome/app/theme/theme_resources.h" #include "chrome/browser/tab_contents.h" @@ -49,6 +50,7 @@ #include "chrome/common/pref_service.h" #include "chrome/common/resource_bundle.h" #include "chrome/common/win_util.h" +#include "chrome/views/client_view.h" #include "chrome/views/button.h" #include "chrome/views/focus_manager.h" #include "chrome/views/hwnd_view.h" diff --git a/chrome/browser/views/constrained_window_impl.h b/chrome/browser/views/constrained_window_impl.h index 7ccd067..5a37e10 100644 --- a/chrome/browser/views/constrained_window_impl.h +++ b/chrome/browser/views/constrained_window_impl.h @@ -27,9 +27,10 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_BROWSER_CONSTRAINED_WINDOW_IMPL_H__ -#define CHROME_BROWSER_CONSTRAINED_WINDOW_IMPL_H__ +#ifndef CHROME_BROWSER_CONSTRAINED_WINDOW_IMPL_H_ +#define CHROME_BROWSER_CONSTRAINED_WINDOW_IMPL_H_ +#include "base/gfx/rect.h" #include "chrome/browser/constrained_window.h" #include "chrome/browser/tab_contents_delegate.h" #include "chrome/views/custom_frame_window.h" @@ -221,7 +222,7 @@ class ConstrainedWindowImpl : public ConstrainedWindow, // Current display rectangle (relative to owner_'s visible area). gfx::Rect current_bounds_; - DISALLOW_EVIL_CONSTRUCTORS(ConstrainedWindowImpl); + DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowImpl); }; -#endif // #ifndef CHROME_BROWSER_CONSTRAINED_WINDOW_IMPL_H__ +#endif // #ifndef CHROME_BROWSER_CONSTRAINED_WINDOW_IMPL_H_ diff --git a/chrome/browser/views/dom_view.cc b/chrome/browser/views/dom_view.cc new file mode 100644 index 0000000..d0473a9 --- /dev/null +++ b/chrome/browser/views/dom_view.cc @@ -0,0 +1,64 @@ +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "chrome/browser/views/dom_view.h" + +#include "chrome/browser/dom_ui/dom_ui_host.h" + +DOMView::DOMView(const GURL& contents) + : contents_(contents), initialized_(false), host_(NULL) { +} + +DOMView::~DOMView() { + if (host_) { + Detach(); + host_->Destroy(); + host_ = NULL; + } +} + +bool DOMView::Init(Profile* profile, SiteInstance* instance) { + if (initialized_) + return true; + initialized_ = true; + + // TODO(timsteele): This should use a separate factory method; e.g + // a DOMUIHostFactory rather than TabContentsFactory, because DOMView's + // should only be associated with instances of DOMUIHost. + TabContentsType type = TabContents::TypeForURL(&contents_); + TabContents* tab_contents = TabContents::CreateWithType(type, + GetViewContainer()->GetHWND(), profile, instance); + host_ = tab_contents->AsDOMUIHost(); + DCHECK(host_); + + ChromeViews::HWNDView::Attach(host_->GetContainerHWND()); + host_->SetupController(profile); + host_->controller()->LoadURL(contents_, PageTransition::START_PAGE); + return true; +} diff --git a/chrome/browser/views/dom_view.h b/chrome/browser/views/dom_view.h index 07a5f71..d55914d 100644 --- a/chrome/browser/views/dom_view.h +++ b/chrome/browser/views/dom_view.h @@ -30,53 +30,27 @@ // DOMView is a ChromeView that displays the content of a web DOM. // It should be used with data: URLs. -#ifndef CHROME_BROWSER_VIEWS_DOM_VIEW_H__ -#define CHROME_BROWSER_VIEWS_DOM_VIEW_H__ +#ifndef CHROME_BROWSER_VIEWS_DOM_VIEW_H_ +#define CHROME_BROWSER_VIEWS_DOM_VIEW_H_ -#include "base/basictypes.h" -#include "base/scoped_ptr.h" -#include "base/string_util.h" -#include "chrome/browser/render_process_host.h" -#include "chrome/browser/dom_ui/dom_ui_host.h" #include "chrome/views/hwnd_view.h" +#include "googleurl/src/gurl.h" + +class DOMUIHost; +class Profile; +class SiteInstance; class DOMView : public ChromeViews::HWNDView { public: // Construct a DOMView to display the given data: URL. - explicit DOMView(const GURL& contents) - : contents_(contents), initialized_(false), host_(NULL) {} - - virtual ~DOMView() { - if (host_) { - Detach(); - host_->Destroy(); - host_ = NULL; - } - } + explicit DOMView(const GURL& contents); + virtual ~DOMView(); // Initialize the view, causing it to load its contents. This should be // called once the view has been added to a container. // If |instance| is not null, then the view will be loaded in the same // process as the given instance. - bool Init(Profile* profile, SiteInstance* instance) { - if (initialized_) - return true; - initialized_ = true; - - // TODO(timsteele): This should use a separate factory method; e.g - // a DOMUIHostFactory rather than TabContentsFactory, because DOMView's - // should only be associated with instances of DOMUIHost. - TabContentsType type = TabContents::TypeForURL(&contents_); - TabContents* tab_contents = TabContents::CreateWithType(type, - GetViewContainer()->GetHWND(), profile, instance); - host_ = tab_contents->AsDOMUIHost(); - DCHECK(host_); - - ChromeViews::HWNDView::Attach(host_->GetContainerHWND()); - host_->SetupController(profile); - host_->controller()->LoadURL(contents_, PageTransition::START_PAGE); - return true; - } + bool Init(Profile* profile, SiteInstance* instance); protected: DOMUIHost* host_; @@ -85,8 +59,7 @@ class DOMView : public ChromeViews::HWNDView { GURL contents_; bool initialized_; - DISALLOW_EVIL_CONSTRUCTORS(DOMView); + DISALLOW_COPY_AND_ASSIGN(DOMView); }; -#endif // CHROME_BROWSER_VIEWS_DOM_VIEW_H__ - +#endif // CHROME_BROWSER_VIEWS_DOM_VIEW_H_ diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc index 4cd218d..b9612b1 100644 --- a/chrome/browser/views/download_item_view.cc +++ b/chrome/browser/views/download_item_view.cc @@ -27,23 +27,20 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include <vector> - #include "chrome/browser/views/download_item_view.h" -#include "base/message_loop.h" -#include "base/task.h" -#include "base/timer.h" +#include <vector> + #include "chrome/app/theme/theme_resources.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/download_util.h" #include "chrome/browser/views/download_shelf_view.h" #include "chrome/common/gfx/chrome_canvas.h" -#include "chrome/common/l10n_util.h" #include "chrome/common/resource_bundle.h" #include "chrome/common/win_util.h" #include "chrome/views/root_view.h" #include "chrome/views/view_container.h" + #include "generated_resources.h" // TODO(paulg): These may need to be adjusted when download progress @@ -466,7 +463,7 @@ bool DownloadItemView::OnMousePressed(const ChromeViews::MouseEvent& event) { complete_animation_->End(); if (event.IsOnlyLeftMouseButton()) { - CPoint point(event.GetLocation()); + WTL::CPoint point(event.GetX(), event.GetY()); if (event.GetX() < drop_down_x_) { SetState(PUSHED, NORMAL); return true; @@ -530,7 +527,6 @@ void DownloadItemView::OnMouseReleased(const ChromeViews::MouseEvent& event, starting_drag_ = false; return; } - CPoint point(event.GetLocation()); if (event.IsOnlyLeftMouseButton() && event.GetX() < drop_down_x_) OpenDownload(); diff --git a/chrome/browser/views/first_run_bubble.cc b/chrome/browser/views/first_run_bubble.cc index f17071c..b880abf 100644 --- a/chrome/browser/views/first_run_bubble.cc +++ b/chrome/browser/views/first_run_bubble.cc @@ -41,6 +41,7 @@ #include "chrome/views/event.h" #include "chrome/views/label.h" #include "chrome/views/native_button.h" +#include "chrome/views/window.h" #include "generated_resources.h" diff --git a/chrome/browser/views/frame/browser_view2.cc b/chrome/browser/views/frame/browser_view2.cc index 40d5a50..5db1c58 100644 --- a/chrome/browser/views/frame/browser_view2.cc +++ b/chrome/browser/views/frame/browser_view2.cc @@ -29,6 +29,7 @@ #include "chrome/browser/views/frame/browser_view2.h" +#include "chrome/app/chrome_dll_resource.h" #include "chrome/app/theme/theme_resources.h" #include "chrome/browser/app_modal_dialog_queue.h" #include "chrome/browser/browser.h" @@ -41,10 +42,13 @@ #include "chrome/browser/views/frame/browser_frame.h" #include "chrome/browser/views/status_bubble.h" #include "chrome/browser/views/toolbar_view.h" +#include "chrome/common/drag_drop_types.h" #include "chrome/common/l10n_util.h" #include "chrome/common/os_exchange_data.h" #include "chrome/common/pref_names.h" #include "chrome/common/resource_bundle.h" +#include "chrome/views/view.h" +#include "chrome/views/window.h" #include "generated_resources.h" // static diff --git a/chrome/browser/views/html_dialog_view.cc b/chrome/browser/views/html_dialog_view.cc index cdf48e8..890d5a4 100644 --- a/chrome/browser/views/html_dialog_view.cc +++ b/chrome/browser/views/html_dialog_view.cc @@ -27,9 +27,10 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "chrome/browser/browser.h" #include "chrome/browser/views/html_dialog_view.h" +#include "chrome/browser/browser.h" +#include "chrome/views/root_view.h" #include "chrome/views/window.h" //////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/views/hung_renderer_view.cc b/chrome/browser/views/hung_renderer_view.cc index b121b00..80f8b03 100644 --- a/chrome/browser/views/hung_renderer_view.cc +++ b/chrome/browser/views/hung_renderer_view.cc @@ -34,7 +34,7 @@ #include "chrome/browser/browser_list.h" #include "chrome/browser/render_view_host.h" #include "chrome/browser/standard_layout.h" -#include "chrome/browser/tab_contents.h" +#include "chrome/browser/web_contents.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/gfx/chrome_canvas.h" #include "chrome/common/gfx/path.h" diff --git a/chrome/browser/views/info_bar_item_view.cc b/chrome/browser/views/info_bar_item_view.cc index 99740f7..6fc6242 100644 --- a/chrome/browser/views/info_bar_item_view.cc +++ b/chrome/browser/views/info_bar_item_view.cc @@ -35,6 +35,7 @@ #include "chrome/views/external_focus_tracker.h" #include "chrome/views/image_view.h" #include "chrome/views/root_view.h" +#include "chrome/views/view_container.h" #include "generated_resources.h" diff --git a/chrome/browser/views/info_bubble.cc b/chrome/browser/views/info_bubble.cc index a9671f6..b087451b 100644 --- a/chrome/browser/views/info_bubble.cc +++ b/chrome/browser/views/info_bubble.cc @@ -37,7 +37,7 @@ #include "chrome/common/gfx/path.h" #include "chrome/common/resource_bundle.h" #include "chrome/common/win_util.h" -#include "chrome/views/focus_manager.h" +#include "chrome/views/root_view.h" using ChromeViews::View; diff --git a/chrome/browser/views/info_bubble.h b/chrome/browser/views/info_bubble.h index adb46c7..1fa01d9 100644 --- a/chrome/browser/views/info_bubble.h +++ b/chrome/browser/views/info_bubble.h @@ -27,11 +27,12 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_BROWSER_VIEWS_INFO_BUBBLE_H__ -#define CHROME_BROWSER_VIEWS_INFO_BUBBLE_H__ +#ifndef CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_ +#define CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_ #include "chrome/common/slide_animation.h" #include "chrome/views/hwnd_view_container.h" +#include "chrome/views/view.h" // InfoBubble is used to display an arbitrary view above all other windows. // Think of InfoBubble as a tooltip that allows you to embed an arbitrary view @@ -167,7 +168,7 @@ class InfoBubble : public ChromeViews::HWNDViewContainer, // The bubble we're in. InfoBubble* host_; - DISALLOW_EVIL_CONSTRUCTORS(ContentView); + DISALLOW_COPY_AND_ASSIGN(ContentView); }; // Creates and return a new ContentView containing content. @@ -186,7 +187,7 @@ class InfoBubble : public ChromeViews::HWNDViewContainer, // The fade-in animation. scoped_ptr<SlideAnimation> fade_animation_; - DISALLOW_EVIL_CONSTRUCTORS(InfoBubble); + DISALLOW_COPY_AND_ASSIGN(InfoBubble); }; -#endif // CHROME_BROWSER_VIEWS_INFO_BUBBLE_H__ +#endif // CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_ diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc index ad2a7b5..f354ef4 100644 --- a/chrome/browser/views/location_bar_view.cc +++ b/chrome/browser/views/location_bar_view.cc @@ -52,6 +52,7 @@ #include "chrome/common/win_util.h" #include "chrome/views/background.h" #include "chrome/views/border.h" +#include "chrome/views/root_view.h" #include "chrome/views/view_container.h" #include "googleurl/src/gurl.h" #include "googleurl/src/url_canon.h" @@ -603,7 +604,7 @@ void LocationBarView::OnMouseEvent(const ChromeViews::MouseEvent& event, if (event.IsRightMouseButton()) flags |= MK_RBUTTON; - CPoint screen_point(event.GetLocation()); + CPoint screen_point(event.GetX(), event.GetY()); ConvertPointToScreen(this, &screen_point); location_entry_->HandleExternalMsg(msg, flags, screen_point); diff --git a/chrome/browser/views/options/general_page_view.cc b/chrome/browser/views/options/general_page_view.cc index 2902ff1..58991e9 100644 --- a/chrome/browser/views/options/general_page_view.cc +++ b/chrome/browser/views/options/general_page_view.cc @@ -51,6 +51,7 @@ #include "chrome/common/chrome_constants.h" #include "chrome/common/l10n_util.h" #include "chrome/common/pref_names.h" +#include "chrome/common/pref_service.h" #include "chrome/common/resource_bundle.h" #include "chrome/views/checkbox.h" #include "chrome/views/grid_layout.h" diff --git a/chrome/browser/views/options/language_combobox_model.cc b/chrome/browser/views/options/language_combobox_model.cc index 29a6659..a2da0c3 100644 --- a/chrome/browser/views/options/language_combobox_model.cc +++ b/chrome/browser/views/options/language_combobox_model.cc @@ -32,6 +32,7 @@ #include "base/string_util.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/user_metrics.h" +#include "chrome/common/l10n_util.h" #include "chrome/common/pref_service.h" #include "unicode/uloc.h" diff --git a/chrome/browser/views/options/options_page_view.cc b/chrome/browser/views/options/options_page_view.cc index b659249..93ed694 100644 --- a/chrome/browser/views/options/options_page_view.cc +++ b/chrome/browser/views/options/options_page_view.cc @@ -28,9 +28,11 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "chrome/browser/views/options/options_page_view.h" + #include "chrome/browser/browser_process.h" #include "chrome/browser/user_metrics.h" #include "chrome/common/pref_service.h" +#include "chrome/views/view_container.h" /////////////////////////////////////////////////////////////////////////////// // OptionsPageView diff --git a/chrome/browser/views/options/options_window_view.cc b/chrome/browser/views/options/options_window_view.cc index 5b29fdb..904e54e 100644 --- a/chrome/browser/views/options/options_window_view.cc +++ b/chrome/browser/views/options/options_window_view.cc @@ -42,6 +42,7 @@ #include "chrome/common/resource_bundle.h" #include "chrome/views/dialog_delegate.h" #include "chrome/views/tabbed_pane.h" +#include "chrome/views/root_view.h" #include "chrome/views/window.h" #include "generated_resources.h" diff --git a/chrome/browser/views/restart_message_box.cc b/chrome/browser/views/restart_message_box.cc index d3f52cd..757ad52 100644 --- a/chrome/browser/views/restart_message_box.cc +++ b/chrome/browser/views/restart_message_box.cc @@ -29,6 +29,7 @@ #include "chrome/browser/views/restart_message_box.h" +#include "chrome/common/l10n_util.h" #include "chrome/views/message_box_view.h" #include "chrome/views/window.h" diff --git a/chrome/browser/views/star_toggle.cc b/chrome/browser/views/star_toggle.cc index e480c40..4387998 100644 --- a/chrome/browser/views/star_toggle.cc +++ b/chrome/browser/views/star_toggle.cc @@ -75,7 +75,7 @@ bool StarToggle::OnMouseDragged(const ChromeViews::MouseEvent& e) { } bool StarToggle::OnMousePressed(const ChromeViews::MouseEvent& e) { - if (e.IsLeftMouseButton() && HitTest(e.GetLocation())) { + if (e.IsLeftMouseButton() && HitTest(WTL::CPoint(e.GetX(), e.GetY()))) { RequestFocus(); return true; } @@ -84,7 +84,7 @@ bool StarToggle::OnMousePressed(const ChromeViews::MouseEvent& e) { void StarToggle::OnMouseReleased(const ChromeViews::MouseEvent& e, bool canceled) { - if (e.IsLeftMouseButton() && HitTest(e.GetLocation())) + if (e.IsLeftMouseButton() && HitTest(WTL::CPoint(e.GetX(), e.GetY()))) SwitchState(); } diff --git a/chrome/browser/views/status_bubble.cc b/chrome/browser/views/status_bubble.cc index 04b44f3..a9e76a7 100644 --- a/chrome/browser/views/status_bubble.cc +++ b/chrome/browser/views/status_bubble.cc @@ -41,6 +41,7 @@ #include "chrome/common/resource_bundle.h" #include "chrome/views/hwnd_view_container.h" #include "chrome/views/label.h" +#include "chrome/views/root_view.h" #include "chrome/views/view_container.h" #include "googleurl/src/gurl.h" #include "net/base/net_util.h" diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc index 476318d..c9cbc43 100644 --- a/chrome/browser/views/toolbar_view.cc +++ b/chrome/browser/views/toolbar_view.cc @@ -50,10 +50,12 @@ #include "chrome/browser/views/toolbar_star_toggle.h" #include "chrome/browser/view_ids.h" #include "chrome/common/chrome_constants.h" +#include "chrome/common/drag_drop_types.h" #include "chrome/common/l10n_util.h" #include "chrome/common/notification_service.h" #include "chrome/common/os_exchange_data.h" #include "chrome/common/pref_names.h" +#include "chrome/common/pref_service.h" #include "chrome/common/resource_bundle.h" #include "chrome/views/button_dropdown.h" #include "chrome/views/hwnd_view.h" diff --git a/chrome/browser/web_app_launcher.cc b/chrome/browser/web_app_launcher.cc index 08aa02a..51394d4 100644 --- a/chrome/browser/web_app_launcher.cc +++ b/chrome/browser/web_app_launcher.cc @@ -32,6 +32,7 @@ #include "base/string_util.h" #include "chrome/browser/browser.h" #include "chrome/browser/profile.h" +#include "chrome/browser/web_app.h" // static void WebAppLauncher::Launch(Profile* profile, diff --git a/chrome/browser/web_contents.cc b/chrome/browser/web_contents.cc index 3732714..32b1ecd 100644 --- a/chrome/browser/web_contents.cc +++ b/chrome/browser/web_contents.cc @@ -68,6 +68,7 @@ #include "chrome/common/gfx/chrome_canvas.h" #include "chrome/common/os_exchange_data.h" #include "chrome/common/pref_names.h" +#include "chrome/common/pref_service.h" #include "chrome/common/resource_bundle.h" #include "net/base/mime_util.h" #include "net/base/registry_controlled_domain.h" diff --git a/chrome/browser/web_contents.h b/chrome/browser/web_contents.h index 0ece47b..b61eb70 100644 --- a/chrome/browser/web_contents.h +++ b/chrome/browser/web_contents.h @@ -27,13 +27,11 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_BROWSER_WEB_CONTENTS_H__ -#define CHROME_BROWSER_WEB_CONTENTS_H__ +#ifndef CHROME_BROWSER_WEB_CONTENTS_H_ +#define CHROME_BROWSER_WEB_CONTENTS_H_ #include <hash_map> -#include "base/scoped_handle.h" -#include "chrome/common/win_util.h" #include "chrome/browser/fav_icon_helper.h" #include "chrome/browser/printing/print_view_manager.h" #include "chrome/browser/render_view_host_delegate.h" @@ -152,7 +150,7 @@ class WebContents : public TabContents, void SetDownloadShelfVisible(bool visible); // Returns the SavePackage which manages the page saving job. - inline SavePackage* get_save_package() const { return save_package_.get(); } + SavePackage* get_save_package() const { return save_package_.get(); } // Whether or not the info bar is visible. This delegates to // the ChromeFrame method InfoBarVisibilityChanged. @@ -822,8 +820,7 @@ class WebContents : public TabContents, // Non-null if we're displaying content for a web app. scoped_refptr<WebApp> web_app_; - - DISALLOW_EVIL_CONSTRUCTORS(WebContents); + DISALLOW_COPY_AND_ASSIGN(WebContents); }; -#endif // CHROME_BROWSER_WEB_CONTENTS_H__ +#endif // CHROME_BROWSER_WEB_CONTENTS_H_ diff --git a/chrome/browser/wizard/wizard.cc b/chrome/browser/wizard/wizard.cc index cce4f4a..0514bf4 100644 --- a/chrome/browser/wizard/wizard.cc +++ b/chrome/browser/wizard/wizard.cc @@ -31,6 +31,7 @@ #include <math.h> +#include "base/logging.h" #include "chrome/browser/wizard/wizard_step.h" #include "chrome/browser/standard_layout.h" |